I am trying to get the exit code for action script , but parameter command does not capture the output for if then else statement and provide me exit code 0 instead of exit code 100 in the below script
action parameter query "Identity" with description "Please enter the AD User account" with default value "" action parameter query "Error_Folder" with description "Please enter the Folder Name and Path" with default value ""folder create {parameter “Error_Folder”}
// Enter your action script here
// Disable wow64 redirection on x64 OSes
action uses wow64 redirection {not x64 of operating system}
delete __createfile
if { not exists folder “c:\temp”}
folder create "c:\temp"
endif
// CREATEFILE
createfile until END_OF_FILE
ENDPOINTwaithidden powershell -ExecutionPolicy Bypass -command
Disable-ADAccount -Identity {parameter “Identity”}
$? > {parameter “Error_Folder”}\output.txt
$Error > {parameter “Error_Folder”}\error.txt
END_OF_FILE
delete powershell.ps1
move __createfile powershell.ps1
waithidden { pathname of file ((it as string) of value “Path” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell” of native registry) } -ExecutionPolicy Bypass -File powershell.ps1
parameter “file_content”="{{lines of file “output.txt” of folder (parameter “Error_Folder”)}}"
if {parameter “file_content” contains “False”}
exit 100
endif