PS\_ExecuteCommand
Description
Section titled “Description”Executes PowerShell command
The result is being added <gsWorkstationPath>\Logs\Temp\PSOut.log
If execution policy has been set to “Restricted”, single Powershell commands can still be executed
If it is required to perform more than one command, it is recommended to insert the commands into a script and execute them with the function PS_ExecuteScript
Syntax
Section titled “Syntax”PS_ExecuteCommand(sCommand) As Boolean
Parameters
Section titled “Parameters”sCommand (String)
Powershell command that should be executed
Example
Section titled “Example”VBScript
If bStatus Then bStatus = PS_ExecuteCommand("Stop-process -processname notepad")
If bStatus Then bStatus = PS_ExecuteCommand("& {Stop-process -processname notepad}")Related functions
Section titled “Related functions”