I'm using PowerShell for the 1st time on one of our servers which was just upgraded to VisualCron 8.3.4 and I'm getting the error below. One of the 1st things I noticed is that the error has two slashes (\\) beteween VisualCron and PowerShell when the actual path to the .exe is just ...VisualCron\PowerShell\.... but I'm not sure that's it. This is a simple script which just adds a HEADER to a TEXT file and I've checked all my paths, etc. and they are fine.
POWER SHELL SCRIPT:
## ADDS HEADER TO ATB FILE
## RENAMES FINAL FILE TO CT_OSA_MAGASIN_WHDR.TXT
$ATBFILE = 'F:\CLIENT\Attribution\AttributionStaging\AttributionInputFileStaging\CT_OSA_MAGASIN.TXT'
$HEADERFILE = 'F:\CLIENT\Attribution\AttributionStaging\AttributionInputFileStaging\MAGASIN_HEADER.txt'
$ATBFINALFILENAME = 'CT_OSA_MAGASIN_WHDR.txt'
$(Get-Content $HEADERFILE; Get-Content $ATBFILE) | Set-Content $ATBFILE
Rename-Item "$ATBFILE" "$ATBFINALFILENAME"
ERROR:
ExecuteProcess("D:\Program Files\ME\VisualCron\\PowerShell\TaskPowerShell.exe" 54)->Unhandled execution error: System.TypeLoadException: Could not load type 'System.Management.Automation.Runspaces.WSManConnectionInfo' from assembly 'System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbStandardOut, StringBuilder& sbStandardError, Boolean& bolResult)
at dUtPYORi17ijmNNndt.ULQ6EH7NAE6DFp6YS7.nVBckLHfQ(String[] )
Edited by moderator
2018-05-01T08:52:15Z
|
Reason: Not specified