4 Replies Latest reply on Apr 26, 2020 5:43 AM by Christoph Klapetke

    TSO powershell error for AD user creation

    Christoph Klapetke
      Share This:

      Hi, I will use a powershell script to create new AD user.
      I get as output:
      <powershell-output>
        <metadata>
        <status>success</status>
        </metadata>
        <targets-output>
        <target-output>
        <metadata>
        <os-id>Windows Server 2008</os-id>
        <os-version>6.3.9600</os-version>
        <status>success</status>
        </metadata>
        <commands-output>
        <command-output>
        <metadata>
      <command>D:\working\handle_Add_User.ps1 -Name "Simpson, Homer" -DisplayName "Simpson, Homer" -Path "OU=Test,DC=testad,DC=int,DC=heg,DC=de" -SamAccountName "SimpsonHom" -GivenName "Homer" -Surname "Simpson" -Manager "TempManager" -City "Springfield" -Company "Atomkraftwerk" -Country "US" -Department "Sektor 7G" -Division "Sicherheit" -EmployeeNumber "123456" -HomeDirectory "\\test.ad.de\dfs\user\SimpsonHom" -HomeDrive "P:" -Office "7G" -Organization "Sec" -PostalCode "12345" -StreetAddress "Evergreen Terrace 742" -Title "Sicherheitsinspektor" -RequestId 0815 -Action add</command>
        <line-count>9</line-count>
        <execution-milliseconds>430</execution-milliseconds>
        <exit-code>0</exit-code>
        <status>success</status>
        </metadata>
        <output>
        <line index="1">At line:1 char:246</line>
        <line index="2">+ ... umentlist -Name, "Simpson, Homer", -DisplayName, "Simpson, Homer", </line>
        <line index="3">-Path, "OU=Te ...</line>
        <line index="4">+ ~</line>
        <line index="5">Missing argument in parameter list.</line>
        <line index="6"> + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx </line>
        <line index="7"> ception</line>
        <line index="8"> + FullyQualifiedErrorId : MissingArgument</line>
        <line index="9"> </line>
        </output>
        </command-output>
        </commands-output>
        </target-output>
        </targets-output>
      </powershell-output>

      When I start the script directly on the TSO Server in powershell it works fine.

      Volker Scheithauer

       

      Thanks for help!