Manage Hyper-V VM Integration Services with PowerShell

Manage Hyper-V VM Integration Services with PowerShell

Q: How can I view the state and enable or disable Hyper-V integration services for virtual machines through PowerShell?

A. Several VMIntegrationService cmdlets in PowerShell allow management of the integration services for virtual machines (VMs). To view the state of integration services for a given VM, use the command below:

Get-VMIntegrationService -VMName <virtual machine name>

For example:

PS C:\> Get-VMIntegrationService -VMName savdaldc01

VMName     Name                    Enabled PrimaryStatusDescription SecondaryStatusDescription
------     ----                    ------- ------------------------ --------------------------
savdaldc01 Time Synchronization    False   OK                                                 
savdaldc01 Heartbeat               True    OK                       OK                        
savdaldc01 Key-Value Pair Exchange True    OK                                                 
savdaldc01 Shutdown                True    OK                                                 
savdaldc01 VSS                     True    OK                                                 

To set an integration service to enabled/disabled use the Enable/Disable -VMIntegrationService cmdlets, for example:

[Enable/Disable]-VMIntegrationService -VMName <virtual machine name> -Name "<name of integration service>"

For example:

 Disable-VMIntegrationService -name "Time Synchronization" -vmname savdalda01

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish