Ho il seguente script PS scritto:Come faccio ad avere proprietà specifiche con Get-ADUser
Get-ADUser -Filter * -SearchBase 'OU=Users & Computers, DC=aaaaaaa, DC=com' -Properties DisplayName | Export-CSV "ADUsers.csv"
Da quello che posso dire che dovrebbe essere solo tornando DisplayName. Comunque sta restituendo tutto. Il problema è che DistinguishedName sta causando problemi di troncamento più avanti nel mio processo. Come posso ottenere che lo script restituisca solo determinate proprietà?
hmmm ... che ha restituito un errore: ArgumnetNull.Microsoft.PowerShell.Commands. SelectObjectCommand. – kickinchicken
Sto cercando la sintassi per Select-Object. Se funziona pubblicherò la sceneggiatura. – kickinchicken
l'errore indica che l'utente nella pipe non ha impostato un displayname.Prova a rimuovere '-expand' –