- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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