Automic Workload Automation

  • 1.  JOBS.WIN, Powershell script, Cannot find type [?TypeName]

    Broadcom Employee
    Posted Jul 16, 2018 09:15 AM

    Problem statement: 

     

    Automic's Windows job (JOBS.WIN object) which has to execute a PowerShell Script with a section for New-Object PSObject

     

    $object = New-Object –TypeName PSObject

    $object | Add-Member –MemberType NoteProperty –Name Property1 –Value $temp[1]

    $object | Add-Member –MemberType NoteProperty –Name Property2 –Value $temp[0]

    $object | Add-Member –MemberType NoteProperty –Name Property3 –Value $temp[2]

     

    I can run the Powershell script via PowerShell ISE (from the same server) successfully however Automic is not doing it in same way, instead REP shows a message "Cannot find type [?TypeName]: verify that the assembly containing this type is loaded."

     

    Has anybody encountered this before? Please guide.



  • 2.  Re: JOBS.WIN, Powershell script, Cannot find type [?TypeName]
    Best Answer

    Broadcom Employee
    Posted Jul 17, 2018 05:04 AM

    Resolved.

     

    We have figured out what the problem is. In the front of TypeName the dash is an invalid character, while we copied the script from ISE to JOBS.WIN Process tab. That's why it says [?TypeName] the dash is replaced by a '?' because it doesn't know the character.

     

    We delete the dash in front of TypeName in process tab and retype a dash, the error is resolved.