希望你能幫上忙。當我發出以下命令:Get-ADuser:搜索過濾器無法識別
$ G = GET-ADGroupMember -Server sbintldirectory.com -Identity組別1 $ N =得到-ADGroupMember -Server ad.msdsprd.com -Identity組別1 $ g.samaccountname |其中{$ n.samaccountname -notcontains $ psitem} | out-file c:\ temp \ new.txt $ users = gc C:\ Temp \ new.txt $ a = $ users | foreach {Get-ADuser -LDAPFilter「(samaccountname = $ )」-Server dc:3268} $ a |選擇samaccountname,distinguishedName | out-file c:\ temp \ list.txt $ group =「CN = group1,OU = Testing,DC = domain,DC = com」 get-content「c:\ temp \ list.txt」|的ForEach { Get-ADuser -LDAPFilter "(samaccountname eq $_)" -Server dc:3268 | ForEach
{附加ADGroupMember -Identity $組 - 成員$ .distinguishedName}}
結果: GET-ADUser便有:搜索過濾器無法識別 在行:10字符:1 + GET-ADUser便有-LDAPFilter「(samaccountname eq $ _)」-Server dc:3268 |佛... + ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~類別信息:(未知):(:搜索過濾器無法識別,Microsoft.ActiveDirectory.Management.Commands.GetADUser
非常感謝。
感謝您的回覆。嘗試Get-ADuser -Identity -Server dc:3268並且得到了Get-ADuser:在DC:Domain,DC下找不到具有標識的對象:'<森林中不同域的
user4376180
2014-12-19 13:12:14