PowerShell Snip of the Week – (Get-VMIntegrationService)


Finding the status of a VMs or all your VMs Integration Components can be a very useful troubleshooting tool when you are having various VM management issues.  Examples could be that VMs that have the correct Integration Components versions are slipping into saved state or maybe the VM is not responding to a shutdown command from the Hyper-V or SCVMM console.  I have seen both of these.  This week I have a couple of examples for you that might just come in handy if you come across a VM that just is not responding as a fully enlightened VM should.

These scripts need to be run from a Workstation/Server that has the Hyper-V PowerShell Components

View Status of all Integration Components for a VM:

Get-VM -ComputerName HOSTNAME–VMName <VMNAME>| Get-VMIntegrationService| ft VMName, Name, primarystatusDescription, Enabled

If all ICs are in a good state you will see this  output


If you see this, the VM will go into Saved State when backups are performed



To get just the VMs with Integration Services that have a Primary Status of “No Contact” you can use this method:

$s = “VMHOST1″,”VMHOST2”

foreach ($server in $s) {Get-VM -ComputerName $server | Get-VMIntegrationService| ? primarystatusdescription -like “no*” | ft VMName, Name, primarystatusDescription, Enabled}


Output will look like this if there are any VMs with IC Contact issues.



My next post will go more deeply into what to do when you see these issues with Integration Components.

This entry was posted in Backup, Hyper-V, PowerShell, Windows Server 2012 R2 and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s