Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

You should be able to do

$smallList = @($bigList.Where({$_.PowerState -match 'PoweredOff' -and $_.Status -match 'Decommissioned'}) |

    Select VMname,Status)

$smallList | export-CSV -path c:\Temp\smallList.csv -NoTypeInformation -UseCulture


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos