Hyper-V Cmdlets in Windows PowerShell
Windows PowerShell® is a task-based command-line shell and scripting language designed especially for system administration. This reference topic for the information technology (IT) professional provides assistance in utilizing the Windows PowerShell cmdlets to script and automate tasks.
Hyper-V
This reference provides cmdlet descriptions and syntax for all Hyper-V-specific cmdlets. It lists the cmdlets in alphabetical order based on the verb at the beginning of the cmdlet.
cmdlet | Description |
---|---|
Adds a DVD drive to a virtual machine.
| |
Adds a virtual Fibre Channel host bus adapter to a virtual machine.
| |
Adds group members to a virtual machine group.
| |
Adds a hard disk drive to a virtual machine.
| |
Adds a network for virtual machine migration on one or more virtual machine hosts.
| |
Adds a virtual network adapter to a virtual machine.
| |
Creates an ACL to apply to the traffic through a virtual machine network adapter.
| |
Creates an extended ACL for a virtual network adapter.
| |
Adds a routing domain and virtual subnets to a virtual network adapter.
| |
Adds a RemoteFX video adapter in a virtual machine.
| |
Adds a SCSI controller in a virtual machine.
| |
Adds a path to a storage resource pool.
| |
Adds a virtual switch to an Ethernet resource pool.
| |
Adds a feature to a virtual network adapter.
| |
Adds a feature to a virtual switch.
| |
Adds members to a virtual switch team.
| |
Creates a checkpoint of a virtual machine.
| |
Compares a virtual machine and a virtual machine host for compatibility, returning a compatibility report.
| |
Completes a virtual machine’s failover process on the Replica server. Removes all recovery points on a failed over virtual machine.
| |
Connects a virtual network adapter to a virtual switch.
| |
Associates a host bus adapter with a virtual storage area network (SAN).
| |
Converts the format, version type, and block size of a virtual hard disk file.
| |
Copies a file to a virtual machine.
| |
Debugs a virtual machine.
| |
Disables keyboard, video, and mouse for virtual machines.
| |
Disables virtual machine eventing.
| |
Disables an integration service on a virtual machine.
| |
Disables migration on one or more virtual machine hosts.
| |
Disables one or more RemoteFX physical video adapters from use with RemoteFX-enabled virtual machines.
| |
Disables collection of resource utilization data for a virtual machine or resource pool.
| |
Disables one or more extensions on one or more virtual switches.
| |
Disables TPM functionality on a virtual machine.
| |
Disconnects a virtual network adapter from a virtual switch or Ethernet resource pool.
| |
Removes a host bus adapter from a virtual storage area network (SAN).
| |
Dismounts a virtual hard disk.
| |
Enables keyboard, video, and mouse for virtual machines.
| |
Enables virtual machine eventing.
| |
Enables an integration service on a virtual machine.
| |
Enables migration on one or more virtual machine hosts.
| |
Enables one or more RemoteFX physical video adapters for use with RemoteFX-enabled virtual machines.
| |
Enables replication of a virtual machine.
| |
Collects resource utilization data for a virtual machine or resource pool.
| |
Enables one or more extensions on one or more switches.
| |
Enables TPM functionality on a virtual machine.
| |
Exports a virtual machine to disk.
| |
Exports a virtual machine checkpoint to disk.
| |
Gets the virtual hard disk object associated with a virtual hard disk.
| |
Gets information about a VHD set.
| |
Gets information about a checkpoint in a VHD set.
| |
Gets the virtual machines from one or more Hyper-V hosts.
| |
Gets the BIOS of a virtual machine or snapshot.
| |
Gets the COM ports of a virtual machine or snapshot.
| |
Gets entries showing users and the virtual machines to which they can connect on one or more Hyper-V hosts.
| |
Gets the DVD drives attached to a virtual machine or snapshot.
| |
Gets the Fibre Channel host bus adapters associated with one or more virtual machines.
| |
Gets the firmware configuration of a virtual machine.
| |
Gets the floppy disk drives of a virtual machine or snapshot.
| |
Gets virtual machine groups.
| |
Gets the virtual hard disk drives attached to one or more virtual machines.
| |
Gets a Hyper-V host.
| |
Gets virtual machine host clusters.
| |
Gets the NUMA topology of a virtual machine host.
| |
Gets the status of the virtual machines on the non-uniform memory access (NUMA) nodes of a virtual machine host or hosts.
| |
Returns a list of virtual machine configuration versions that are supported on the host.
| |
Gets the IDE controllers of a virtual machine or snapshot.
| |
Gets the integration services of a virtual machine or snapshot.
| |
Retrieves a key protector for a virtual machine.
| |
Gets the memory of a virtual machine or snapshot.
| |
Gets the networks added for migration to one or more virtual machine hosts.
| |
Gets the virtual network adapters of a virtual machine, snapshot, management operating system, or of a virtual machine and management operating system.
| |
Gets the ACLs configured for a virtual machine network adapter.
| |
Gets extended ACLs configured for a virtual network adapter.
| |
Gets the IP address of a virtual network adapter configured to be used when a virtual machine fails over.
| |
Gets isolation settings for a virtual network adapter.
| |
Gets members of a routing domain.
| |
Gets the virtual LAN settings configured on a virtual network adapter.
| |
Gets the processor of a virtual machine or snapshot.
| |
Gets the RemoteFX video adapter of a virtual machine or snapshot.
| |
Gets the RemoteFX physical graphics adapters on one or more Hyper-V hosts.
| |
Gets the replication settings for a virtual machine.
| |
Gets the authorization entries of a Replica server.
| |
Gets the replication and authentication settings of a Replica server.
| |
Gets the resource pools on one or more virtual machine hosts.
| |
Gets the available virtual machine storage area networks on a Hyper-V host or hosts.
| |
Gets the SCSI controllers of a virtual machine or snapshot.
| |
Gets security information about a virtual machine.
| |
Gets the checkpoints associated with a virtual machine or checkpoint.
| |
Gets the storage paths in a storage resource pool.
| |
Gets virtual switches from one or more virtual Hyper-V hosts.
| |
Gets the extensions on one or more virtual switches.
| |
Retrieves the status of a virtual switch extension feature applied to a virtual network adapter.
| |
Gets the features configured on a virtual network adapter.
| |
Gets the status of a virtual switch extension feature applied on a virtual switch.
| |
Gets the features configured on a virtual switch.
| |
Gets virtual switch teams from Hyper-V hosts.
| |
Gets the switch extensions installed on a virtual machine host.
| |
Gets the port-level features supported by virtual switch extensions on one or more Hyper-V hosts.
| |
Gets the switch-level features on one or more Hyper-V hosts.
| |
Gets video settings for virtual machines.
| |
Grants a user or users access to connect to a virtual machine or machines.
| |
Imports a virtual machine from a file.
| |
Imports initial replication files for a Replica virtual machine to complete the initial replication when using external media as the source.
| |
Reports resource utilization data for one or more virtual machines.
| |
Gets replication statistics and information associated with a virtual machine.
| |
Reports resource utilization data for one or more resource pools.
| |
Merges virtual hard disks.
| |
Mounts one or more virtual hard disks.
| |
Moves a virtual machine to a new Hyper-V host.
| |
Moves the storage of a virtual machine.
| |
Creates a virtual floppy disk.
| |
Creates one or more new virtual hard disks.
| |
Creates a new virtual machine.
| |
Creates a virtual machine group.
| |
Creates a new authorization entry that allows one or more primary servers to replicate data to a specified Replica server.
| |
Creates a resource pool.
| |
Creates a new virtual storage area network (SAN) on a Hyper-V host.
| |
Creates a new virtual switch on one or more virtual machine hosts.
| |
Optimizes the allocation of space used by virtual hard disk files, except for fixed virtual hard disks.
| |
Optimizes VHD set files.
| |
Removes a snapshot from a VHD set file.
| |
Deletes a virtual machine.
| |
Deletes a DVD drive from a virtual machine.
| |
Removes a Fibre Channel host bus adapter from a virtual machine.
| |
Removes a virtual machine group.
| |
Removes members from a virtual machine group.
| |
Deletes one or more virtual hard disks (VHDs) from a virtual machine (VM).
| |
Removes a network from use with migration.
| |
Removes one or more virtual network adapters from a virtual machine.
| |
Removes an ACL applied to the traffic through a virtual network adapter.
| |
Removes an extended ACL for a virtual network adapter.
| |
Removes a routing domain from a virtual network adapter.
| |
Removes a RemoteFX 3D video adapter from a virtual machine.
| |
Removes the replication relationship of a virtual machine.
| |
Removes an authorization entry from a Replica server.
| |
Deletes a resource pool from one or more virtual machine hosts.
| |
Removes a virtual storage area network (SAN) from a Hyper-V host.
| |
Deletes the saved state of a saved virtual machine.
| |
Removes a SCSI controller from a virtual machine.
| |
Deletes a virtual machine checkpoint.
| |
Removes a path from a storage resource pool.
| |
Deletes a virtual switch.
| |
Removes a feature from a virtual network adapter.
| |
Removes a feature from a virtual switch.
| |
Removes a member from a virtual machine switch team.
| |
Renames a virtual machine.
| |
Renames virtual machine groups.
| |
Renames a virtual network adapter on a virtual machine or on the management operating system.
| |
Renames a resource pool on one or more Hyper-V hosts.
| |
Renames a virtual storage area network (SAN).
| |
Renames a checkpoint.
| |
Renames a virtual switch.
| |
Repairs one or more virtual machines.
| |
Resets the replication statistics of a virtual machine.
| |
Resets the resource utilization data collected by Hyper-V resource metering.
| |
Resizes a virtual hard disk.
| |
Restarts a virtual machine.
| |
Restores a virtual machine checkpoint.
| |
Resumes a suspended (paused) virtual machine.
| |
Resumes a virtual machine replication that is in a state of Paused, Error, Resynchronization Required, or Suspended.
| |
Revokes access for one or more users to connect to a one or more virtual machines.
| |
Saves a virtual machine.
| |
Sets properties associated with a virtual hard disk.
| |
Configures a virtual machine.
| |
Configures the BIOS of a Generation 1 virtual machine.
| |
Configures the COM port of a virtual machine.
| |
Configures a virtual DVD drive.
| |
Configures a Fibre Channel host bus adapter on a virtual machine.
| |
Sets the firmware configuration of a virtual machine.
| |
Configures a virtual floppy disk drive.
| |
Configures a virtual hard disk.
| |
Configures a Hyper-V host.
| |
Configures a virtual machine host cluster.
| |
Configures a key protector for a virtual machine.
| |
Configures the memory of a virtual machine.
| |
Sets the subnet, subnet mask, and/or priority of a migration network.
| |
Configures features of the virtual network adapter in a virtual machine or the management operating system.
| |
Configures the IP address of a virtual network adapter to be used when a virtual machine fails over.
| |
Modifies isolation settings for a virtual network adapter.
| |
Sets virtual subnets on a routing domain.
| |
Configures the virtual LAN settings for the traffic through a virtual network adapter.
| |
Configures one or more processors of a virtual machine.
| |
Configures the RemoteFX 3D video adapter of a virtual machine.
| |
Modifies the replication settings of a virtual machine.
| |
Modifies an authorization entry on a Replica server.
| |
Configures a host as a Replica server.
| |
Sets the parent resource pool for a selected resource pool.
| |
Configures a virtual storage area network (SAN) on one or more Hyper-V hosts.
| |
Configures security settings for a virtual machine.
| |
Configures the security policy for a virtual machine.
| |
Configures a virtual switch.
| |
Configures a feature on a virtual network adapter.
| |
Configures a feature on a virtual switch.
| |
Configures a virtual switch team.
| |
Configures video settings for virtual machines.
| |
Starts a virtual machine.
| |
Starts failover on a virtual machine.
| |
Starts replication of a virtual machine.
| |
Starts tracing to a file.
| |
Shuts down, turns off, or saves a virtual machine.
| |
Stops failover of a virtual machine.
| |
Stops an ongoing initial replication.
| |
Cancels an ongoing virtual machine resynchronization.
| |
Stops tracing to file.
| |
Suspends, or pauses, a virtual machine.
| |
Suspends replication of a virtual machine.
| |
Tests a virtual hard disk for any problems that would make it unusable.
| |
Tests connectivity between virtual machines.
| |
Tests the connection between a primary server and a Replica server.
| |
Updates the version of virtual machines.
|
Note:
To view a list all the cmdlets that are available for Hyper-V, run the Get-Command -Module Hyper-V command.
For more information about, or for the syntax of, any of the cmdlets, use the cmdlet, where is the name of the cmdlet that you want to research. For more detailed information, you can run any of the following cmdlets:
●
●
●
Get-Help
●
Get-Help
-Detailed
●
Get-Help
-Examples
●
Get-Help
-Full