Run PowerShell 7 Script

Run Windows Script

Related Topics Link IconRelated Topics 

Definition

Use this command to run a PowerShell 7 script via the installed Microsoft scripting engine.
The Installer passes the control for running the script to a scripting engine. When the scripting engine is finished running the Windows script, the Installer continues to execute the eScript.

The Windows scripts the Installer runs when the RunPS7Script command is used, contain only the default scripting commands for each scripting language. Ivanti DSM does not support additional objects or methods available through the Windows Script Host.

Note: To execute the PowerShell 7 script, the specific client computer needs to have PowerShell 7 installed.

Settings

Input

  • Script file
    Please select the Powershell7 script you would like to execute.
  • Click the Edit button to open and edit the script in the Editor.
    The default editor is Notepad (NOTEPAD.EXE). If you want, you can define another editor by using the following registry value (string):
    Key: HKCU\Software\NetSupport\NetInstall\
    Name: TextEditor

Options

Execution in a x64 environment
For reasons of compatibilty, Ivanti DSM maps file and registry access to the default storage location for 32 bit applications (provided that the storage location differs from that of 64-bit applications). File access: whenever a 32-bit application attempts to access %windir%\System32, the access is redirected to %windir%\SysWOW64. Registry commands: when accessing HKEY_LOCAL_MACHINE\SOFTWARE the calls are redirected to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node. The x64-switch stops this redirection of file and registry accesses when running the script command on a x64 computer; the eScript command runs on the specified path. CallScript command: the script runs in a 64-bit process.

Timeout
A timeout can be set to specify a maximum waiting time for the PowerShell 7 Script. In case the timeout is reached, the eScript won't be continued and won't reach the compliance status. If you leave the timeout empty or set a value of "0", then DSM will wait until the PowerShell 7 script has been executed.