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

猜你喜欢

转载自www.cnblogs.com/yujianadu/p/12028498.html