PowerShell script
This article details the settings and options available for PowerShell script entries, a type of Tools and automation entry in Remote Desktop Manager.
SETTINGS
DESCRIPTION
Name
The name of the entry.
Folder
The folder where the entry is located.
General
Type
Select where the script comes from:
Command — run the command entered in the Command field.
Embedded script — run the script stored in the entry.
Filename — run the script file entered in the Filename field.
Command
Enter the PowerShell command to run. Available when Type is set to Command.
Filename
Enter the path of the PowerShell script file, or click the browse button to select it. Available when Type is set to Filename.
Script
Enter the script in the editor. Click the Edit embedded script button to edit the script in a separate editor window. Available when Type is set to Embedded script.
Run
Arguments
Enter the arguments passed to the script.
Executable arguments
Enter the arguments passed to the PowerShell executable.
Working directory
Select the folder used as the working directory.
PowerShell version
Select the PowerShell version used to run the script:
Default — the list shows the version used by default in parentheses.
Windows PowerShell (2.0) — marked as deprecated in the list.
Windows PowerShell (5.1)
PowerShell 7
Mode
Select where the script runs:
Default — shown as Default (Automatic) in the list.
Local — run the script on the local computer.
Remote — run the script on a remote host. When the entry is not launched from a session, Remote Desktop Manager prompts for the host.
Output view
Select how the script output is displayed:
Default — shown as Default (Terminal) in the list.
Terminal
Text
Grid
Command type
Select how the script is passed to PowerShell:
Default — the list shows the command type used by default in parentheses.
Command
Encoded command
Secure command
Terminal
Terminal application
Select the terminal application that hosts PowerShell:
Default — shown as Default (Windows Terminal) in the list.
Classic
Windows Terminal
Let Windows decide
Configuration
Select a Windows Terminal entry whose profile is used to open the terminal. This setting is optional. Leave it empty to use the default profile configured on the computer. Click the browse button to pick an entry, or click the clear button to remove the selection. Available when Terminal application is set to Default or Windows Terminal. The selected entry is saved only when Terminal application is set to Windows Terminal.
Parameters
Parameter name
The name of the parameter. Click the name to rename the parameter in a separate window.
#
The token that identifies the parameter on the command line, such as {1} for the first parameter.
Type
Select the parameter type:
Unused
Text
Secured
Env. variable
Default value
The default value of the parameter. The value is masked when the type is Secured, and unavailable when the type is Unused.
Delete (row button)
Reset the parameter of the row: its type returns to Unused, its default value is cleared, and its name returns to the default name. Shown when the type is not Unused.
Add
Add a parameter at the end of the list.
Delete
Remove the last parameter of the list. Available when parameters were added beyond the first five.
Load
Load the parameters declared in the script into the list. Available when the script is not empty.
Prompt for parameters on open
Prompt for the parameter values when the entry is opened.
On macOS and Linux, the parameter names are typed directly in the list, the token is shown to the left of the name, and the Add parameter button below the list replaces the Add and Delete buttons. Hover over a row and click its delete button to clear the parameter.
Advanced
Use SSL
Use SSL for the remote PowerShell connection.
Load RDM CmdLet
Load the Remote Desktop Manager PowerShell cmdlets in the session that runs the script.
Run as administrator
Run the script with administrator privileges. Enabling this option clears Run as a different user.
Run as a different user
Run the script under another user account. Enabling this option clears Run as administrator.
Use session credentials
Use the credentials of the session the entry is launched on. Remote Desktop Manager uses the credentials from the session tools section first, then the session credentials if nothing is found.
No exit
Keep PowerShell open after the script finishes.
Resize window
Resize the PowerShell window and buffer to the sizes set in the application settings when the script starts.
No profile
Start PowerShell without loading the PowerShell profile.
Hide window
Hide the PowerShell window while the script runs.
No logo
Start PowerShell without displaying the copyright banner.
Debug
Display the preparation steps that Remote Desktop Manager runs before the script, instead of clearing the console.
Open embedded/tabbed
Open the entry in a tab inside Remote Desktop Manager instead of in an external window.
Wait for the application to exit (Remote Desktop Manager will be unavailable)
Wait until PowerShell exits before Remote Desktop Manager becomes available again.
Last updated
Was this helpful?