Hello,
After the update to SCCM 2012 R2 SP1 all PowerShell Scripts will result the
exit code 1...
I use the Task Sequence integrated "Run PowerShell Script" with the option "Bypass". Even if I run a ps1-file with the following code it ends with
exit code 1:
$hostname = hostname
write-host $hostname
smsts.log Shows:
Executing command line: Run Powershell script
TESTCLIENT001
Process completed with exit code 1
Command line returned 1
ReleaseSource() for C:\_SMSTaskSequence\Packages\PS1000E1.
reference count 1 for the source C:\_SMSTaskSequence\Packages\PS1000E1 before releasing
Released the resolved source C:\_SMSTaskSequence\Packages\PS1000E1
Process completed with exit code 1
!--------------------------------------------------------------------------------------------!
Failed to run the action: TEST PS SCRIPT.
Incorrect function. (Error: 00000001; Source: Windows)
Set authenticator in transport
Set a global environment variable _SMSTSLastActionRetCode=1
Set a global environment variable _SMSTSLastActionSucceeded=false
Clear local default environment
Failed to run the action: TEST PS SCRIPT. Execution has been aborted
Is there anyone else who has this issue? Is this maybe a bug? Any ideas?
Thank you.
Patrik