O'Reilly logo

Mastering PowerCLI by Sajal Debnath

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing the guest OS

In this category, we will discuss how to manage the guest OS of a VM using PowerCLI. To manage the different aspects of the guest OS, we can use the following cmdlets:

  • Get-VMGuest
  • Restart-VMGuest
  • Stop-VMGuest
  • Suspend-VMGuest
  • Copy-VMGuestFile
  • Get-VMGuestNetworkInterface
  • Set-VMGuestNetworkInterface
  • Get-VMGuestRoute
  • New-VMGuestRoute
  • Remove-VMGuestRoute
  • Invoke-VMScript

We can use the Get-VMGuest cmdlet to get the guest operating system of the VM. Using the next three cmdlets, that is, Restart-VMGuest, Stop-VMGuest, and Suspend-VMGuest, we can control the power state of a VM guest operating system. The Get-VMGuest cmdlet gives the current status of a VM guest. Similarly, we can use the restart, stop, and suspend cmdlets to restart, stop, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required