Reply to Message

View discussion in a popup

Replying to:
RvdNieuwendijk
Leadership
Leadership

I see that my script got a little mangled by the forum software. I was quite new to the forum when I posted the script. Will do it better this time ;-).

$Baseline = Get-Baseline -TargetType host
Get-VMhost | ForEach-Object {
  Set-VMhost -vmhost $_ -state maintenance
  Remediate-Inventory -Entity $_ -Baseline $Baseline -Confirm:$False
  Set-VMhost -vmhost $_ -state connected
} 

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
Reply
0 Kudos