Enable Hyper-V Integration Services for a VM

Learn how to quickly enable all integration services for a Hyper-V virtual machine.

John Savill

May 6, 2013

1 Min Read
Enable Hyper-V Integration Services for a VM

Q: How can I enable all Hyper-V integration services for a specific virtual machine?

A: While the Enable/Disable VMIntegrationService cmdlets allow a single integration service to be enabled, there's no wildcard capability to enable all.

However, you can enable all with a simple PowerShell command. Simply set the name of the virtual machine (VM) in the first part and last part of the command, and all integration services will be enabled.

Get-VMIntegrationService -VMName  | ForEach-Object { Enable-VMIntegrationService -Name $_.Name -VMName }

Having to set the VM name twice is a pain, so the easiest way would be to save this in a .ps1 file and store the passed VM name in a parameter. For example:

Enable-AllVMIntegrationServices.ps1

Param(
[Parameter(ValuefromPipeline=$true,Mandatory=$true)][string]$vm)

Get-VMIntegrationService -VMName $vm | ForEach-Object { Enable-VMIntegrationService -Name $_.Name -VMName $vm}

Then I can just run it as

.Enable-AllVMIntegrationServices.ps1 savdalda01

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like