Windows Action PCK.AUTOMIC_FILESYSTEM.PUB.ACTION.CREATE_DIR does not work in Agent with PowerShell 5.0

Document ID : KB000088107
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Affects Release version(s): 7

Error Message :
__uc_return : The term '__uc_return' 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.

The Windows Action PCK-AUTOMIC-FILESYSTEM-PUB-ACTION-CREATE-DIR does not work in Agent with PowerShell version 5.

If PowerShell version 4.0 is used there are no problems encountered.  However, if running an Agent with PowerShell 5.0 the following errors are displayed:
 
Exception found: System.Management.Automation.RuntimeException
Exception text: You cannot call a method on a null-valued expression.
__uc_return : The term '__uc_return' 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 C:\Automic\Automation.Platform\Agents\windows\TEMP\JAACGDTT.TXT.ps1:76 char:3
+   __uc_return( 9999 )
+   ~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (__uc_return:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CommandNotFoundException

 
Environment:
OS Version: N/A
Cause:
Cause type:
Defect
Root Cause: PCK-AUTOMIC-FILESYSTEM-PUB-ACTION-CREATE-DIR fails in Agent using PowerShell version 5.
Resolution:
Update to a fix version listed below or a newer version if available.

Fix Status: Released

Fix Version(s):
Package.ITPA.Shared_PCK.ITPA_SHARED - 1.2.3 - Available
Package.ITPA.Shared_PCK.ITPA_SHARED - 1.2.2 - Available
Additional Information:
Workaround :
N/A