领益科技:AD中导出所有计算机的(计算机名+操作系统类型)

要想用powershell管理域,首先先加载activedirectory模块

PS C:\> import-module activedirectory



下面就可以利用get-adcomputer开干了

PS C:\Windows\system32> Get-ADComputer -SearchBase "ou=lstech,dc=lstech,dc=com" -filter * -property * | Select-Object name,operatingsystem >C:\computer.csv

posted on 2019-12-12 12:44  遇见阿杜  阅读(1895)  评论(0编辑  收藏  举报