Get-ADComputer -Filter * -SearchBase "OU=TestOU,DC=TestDomain,DC=com" -Properties * | Select -Property Name,DNSHostName,Enabled,LastLogonDate | Export-CSV "C:\AllComputersInOU.csv" -NoTypeInformation -Encoding UTF8
04-05
3137
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)