管道识别参数

时间:2014-03-25 16:19:18

标签: active-directory powershell-v3.0

我试图在AD中对计算机对象进行批量更改,但是更改来自文本文件,下面的脚本,我无法管道" samaccountname"我要对PC子集的-identity参数进行更改。它一定是非常简单的东西,我不知道,但是任何帮助都会非常感激。谢谢大家!

 Get-QADComputer -searchroot "gwinet.net/DigiSign/DigiSign" |
 where {$_.computername -like "DS-*" -and $_.parentcontainer -eq "gwinet.net/DigiSign/DigiSign" -and $_.samaccountname -notlike "*$*"}|
 select samaccountname|
 get-content c:\digisignpcs.txt|ForEach-Object{
 Set-QADComputer  -SamAccountName $_.toupper()}

0 个答案:

没有答案