要想用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

相关文章:

猜你喜欢
  • 2021-07-13
  • 2021-12-15
  • 2022-01-05
相关资源
相似解决方案