powershell 统计AD中所有计算机及对应的操作系统信息


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

PS C:\> import-module activedirectory

 

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

PS C:\Windows\system32> Get-ADComputer -SearchBase "ou=xxx,ou=xxx,dc=xxx,dc=com" -filter * -property * | Select-Object name,operatingsystem >\\远程计算机名\share\system\powershell\computer.txt


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM