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, ...
Get Mastering PowerCLI now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.