Guten Abend,
ich versuche Benutzer von CSV Datei in AD aufzunehmen. Die Datei habe ich einfach selbst erstellt in Editor.
Ich mache nach diese Anleitung "Youtube Active Directory Benutzer aus CSV erstellen" gemacht. Leider der Link kann ich nicht posten.
Unter dem Video steht einen Link woher man der Code kopieren kann.
Also wie es im Video gezeigt wird. Ich habe nur einlese Pfad und Ausgabe Pfad geändert alle andere habe ich so übernommen.
Aber es funktioniert trotzdem nicht.
Wenn ich die Code starte steht unter
cmdlet New-ADUser at command pipeline position 1
Supply values for the following parameter:
Name: Mustermann
Wenn ich hier Name "Mustermann" schreibe dann wird Mustermann in der AD hinzugefügt und Rest erscheint lange Fehlermeldung und unter steht wieder den gleiche Text
cmdlet New-ADUser at command pipeline position 1
Supply values for the following parameter:
Name: Mustermann
Wie es in der Video gezeigt wurde CSV Datei korrekt eingebunden, weil ich die Anzahl von Benutzern ausgeben kann und ebenso die Benutzer, welcher am erste Stehle steht. Also alles wie in Video gezeigt ist.
Die Fehlermeldung sieht so aus.
-Surname : The term '-Surname' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:9 char:7+ -Surname $Benutzer.Name+ ~~~~~~~~+ CategoryInfo : ObjectNotFound: (-Surname:String) [], CommandNotFoundException+ FullyQualifiedErrorId : CommandNotFoundException
-GivenName : The term '-GivenName' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:10 char:7+ -GivenName $Benutzer.Vorname+ ~~~~~~~~~~+ CategoryInfo : ObjectNotFound: (-GivenName:String) [], CommandNotFoundException+ FullyQualifiedErrorId : CommandNotFoundException
-SamAccountName : The term '-SamAccountName' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:11 char:7+ -SamAccountName $Benutzer.Login+ ~~~~~~~~~~~~~~~+ CategoryInfo : ObjectNotFound: (-SamAccountName:String) [], CommandNotFoundException+ FullyQualifiedErrorId : CommandNotFoundException
-UserPrincipalName : The term '-UserPrincipalName' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:12 char:7+ -UserPrincipalName $benutzer.Login+ ~~~~~~~~~~~~~~~~~~+ CategoryInfo : ObjectNotFound: (-UserPrincipalName:String) [], CommandNotFoundException+ FullyQualifiedErrorId : CommandNotFoundException
ConvertTo-SecureString : Cannot bind argument to parameter 'String' because it is null.
At line:13 char:46+ ... ord ($Benutzer.Password | ConvertTo-SecureString -AsPlainText -Force)+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : InvalidData: (:) [ConvertTo-SecureString], ParameterBindingValidationException+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ConvertToSecureS
tringCommand
-AccountPassword : The term '-AccountPassword' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:13 char:7+ -AccountPassword ($Benutzer.Password | ConvertTo-SecureString - ...+ ~~~~~~~~~~~~~~~~+ CategoryInfo : ObjectNotFound: (-AccountPassword:String) [], CommandNotFoundException+ FullyQualifiedErrorId : CommandNotFoundException
-Enabled: : The term '-Enabled:' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:14 char:7+ -Enabled:$true+ ~~~~~~~~~+ CategoryInfo : ObjectNotFound: (-Enabled::String) [], CommandNotFoundException+ FullyQualifiedErrorId : CommandNotFoundException
-Displayname : The term '-Displayname' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:15 char:7+ -Displayname "$($Benutzer.Vorname) $($Benutzer.Name)"+ ~~~~~~~~~~~~+ CategoryInfo : ObjectNotFound: (-Displayname:String) [], CommandNotFoundException+ FullyQualifiedErrorId : CommandNotFoundException
Wo mache ich Fehler hat jemand eine Idee?