Operating systems supported: Windows XP SP3+/Server 2008 with Powershell add-on, Windows 7, Windows Server 2008 or later
There are five variants of this command available.
executePowershell() - Executes a powershell file, or command with arguments, or both. When running this command on either a 32bit or 64bit machine, no system credential or user credential is provided.
executePowerShell32BitSystem - Executes a powershell file, or command with arguments, or both, as a 32 bit system command.
executePowerShell32BitUser - Executes a powershell file, or command with arguments, or both, as a 32 bit user command.
executePowerShell64BitSystem - Executes a powershell file, or command with arguments, or both, as a 64 bit system command.
executePowerShell64BitUser - Executes a powershell file, or command with arguments, or both, as a 64 bit user command.
System and user commands:
System - If asystem command is run, execution is restricted to the agent's system level access.
User - If a usercommand is selected, then a credential must be specified by running either the impersonateUser() or useCredential() command before this command.
Example
executePowershellCommand64BitSystem("#ps_service_script#, "#servicename#", false, "All Operating Systems", "All Windows Operating Systems, "Halt on Fail")