Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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


For some commands, it may be necessary to add extra formatting to sCommand parameter. In the code block, you can see examples of these formats

Syntax

PS_ExecuteCommand(sCommand) As Boolean


Parameters

sCommand (String)

Powershell command that should be executed


Example

VBScript
If bStatus Then bStatus = PS_ExecuteCommand("Stop-process -processname notepad")

If bStatus Then bStatus = PS_ExecuteCommand("& {Stop-process -processname notepad}")

Scripting Guidelines


Related functions

  • No labels