cmd导出服务器文件大小,通过powershell或者cmd导出单个OU计算机信息
您好
要顯示計算機是否禁用可以再加上Enabled屬性,值顯示為False的即是被禁用的。
$file = 'C:\temp\list.csv'
$ou = "OU=test, DC=contoso, DC=com"
Get-ADComputer -SearchBase $ou -Filter * | Select-Object Name,DistinguishedName,Enabled | Export-Csv -NoTypeInformation -Path $file
如果是要單獨導出禁用的計算機可以這樣
$file = 'C:\temp\disbled.csv'
$ou = "OU=test, DC=contoso, DC=com"
Get-ADComputer -SearchBase $ou -Filter "Enabled -eq '$False'" | Select-Object Name,DistinguishedName,Enabled | Export-Csv -NoTypeInformation -Path $file
如果回答是有幫助的,請將其標記為答案。如您還有其他疑問,請隨時與我們聯系。
祝好
Ian Xue
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的cmd导出服务器文件大小,通过powershell或者cmd导出单个OU计算机信息的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 设计工作室名字(设计公司起名大全独特寓意
- 下一篇: 怎么证明根号2是无理数怎么证明根号2是无