2013-07-16 67 views
0

我現在已經寫了一個腳本,它應該在>> LDAP < <(不是AD)中創建一個新的用戶對象。 它沒有返回錯誤,但用戶沒有創建...Powershell-LDAP添加用戶

$authenticationType = [System.DirectoryServices.AuthenticationTypes]::ServerBind 
$obj = new-object system.directoryservices.directoryEntry ($Container, "uid=user,ou=ed,o=company", "password" , $authenticationType) 
$newobj = $obj.PSBase.Children.Add([string]$RDN,[string]$Class) 
$obj.PSBase.CommitChanges() 

我打電話給我用$ RDN功能是用戶名,$類=「用戶」和$容器(「LDAP://服務器。 com:999/ou = user,o = company「)應該創建對象的路徑。

我希望有人能幫助我。)

電賀 Madeye

回答

0

解決:)

我結合ADSI:和目錄:進入去我的解決方案。

Greetz Madeye