Users

All Posts (3)

avatar

James Schlackman

Powershell terminal entries do not run if the script contains a #Required directive

avatar
avatar
avatar
avatar
avatar

Now working as expected, thanks!

Powershell terminal entries do not run if the script contains a #Required directive

avatar
avatar
avatar
avatar
avatar

Thanks, this is great info. Having full support for these directives is ideal but being able to work around both scenarios in the meantime is very helpful.

Powershell terminal entries do not run if the script contains a #Required directive

avatar
avatar
avatar
avatar
avatar

I started using Devolutions RDM recently and have been adding some of my commonly-used scripts as PowerShell terminal (local) entries, but I've discovered that RDM will not run any script that includes a #Requires directive, e.g.

#Requires -Modules ExchangeOnlineManagement or #Requires -RunAsAdministrator

If such a directive is included in the script, the entry will silently fail when configured for tabbed mode. If set to run in external mode, an exception error dialog is immediately shown when the entry is run:

ArgumentOutOfRangeException - startIndex ('-1') must be a non-negative value. (Parameter 'startIndex')

Actual value was -1.

Screenshot 2025-10-28 104135.png

Is this a bug or is there a configuration change I can make? I did send an error report if that helps.

1 - 3 of 3 items