In your Hyper-V environment, you might have 1 server or a few hundred servers. When it comes to managing this, manual work is bit of a cumbersome task, especially when you need to firstly check things or set something across them all.

This is where PowerShell comes in to play. You can update pretty much most things on a Server/s. In this example, we want to enable the heartbeat Integration Service which was turned off. You can do this line by line or call a variable to update multiple machines at once.

Take note, enabling this heartbeat Integration Service might cause the Virtual Machine to reboot. Launch PowerShell on your VMM Server or a host and run the following command to enable the Heartbeat:

  • get-vm -computername <ServerName> | Get-VMIntegrationService -Name heartbeat* | Enable-VMIntegrationService

Firstly, replace <ServerName> with your computer name that you want to update this on.

The above will update one Server, you could use a variable reading a CSV or TXT file to update multiple servers, for example:

  • $Servers = Import-CSV <Path>
  • get-vm -computername $Servers | Get-VMIntegrationService -Name heartbeat* | Enable-VMIntegrationService

Hope it helps.

    wpChatIcon

    Discover more from COLLABORATION PRO

    Subscribe now to keep reading and get access to the full archive.

    Continue reading