- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could do something like this
Get-VMHost -PipelineVariable esx |
ForEach-Object -Process {
$esxcli = Get-EsxCli -VMHost $esx -V2
$esxcli.network.firewall.ruleset.list.Invoke() |
where { $_.Name -match "^CIM" -and $_.Enabled -eq 'true' }
ForEach-Object -Process {
$esxcli.network.firewall.ruleset.set.Invoke(@{
enabled = $true
rulesetid = $_.Name
})
}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference