(Get-ADComputer-Filter*-SearchBase"ou=mg_workstations,dc=acme,dc=org").Name |
Select-Object @{Name='ComputerName';Expression={$_}},@{Name='FolderExist';Expression={ Test-Path"\\$_\c$\users\UserID"}} | Export-CSV c:\temp\UserID.csv
Select-Object @{Name='ComputerName';Expression={$_}},@{Name='FolderExist';Expression={ Test-Path"\\$_\c$\users\UserID"}} | Export-CSV c:\temp\UserID.csv
I'm trying to understand this code. I know it reads AD and then performs a loop on the data. It then uses arrays (2 in a row) but what I don't get is where do you get the commands within the arrays? 'FolderExist" for example.
I know I can get verbose data like this: Get-Process | Get-Member but how do you find out information on the commands placed within the array?