Hi,
I've noticed the following behaviour when using DontShow as a parameter definition in scripts
example:param( [Parameter()] $Test, [Parameter(DontShow)] $Test2)
When running the script in the GUI 'Test2' does not show, which is expected and correct.
However, When using the following command in another script:
This works:Invoke-PSUScript -Script "HelloWorld.ps1" -Integrated -Parameters @{Test="testString"}
This fails:Invoke-PSUScript -Script "HelloWorld.ps1" -Integrated -Parameters @{Test="testString";Test2="asdsad"}
The error message is:Unknown parameter Test2. Parameters for this script are Test
Expected behaviour for me is that DontShow is reflected in the admin menu run script popup, but still available as a parameter via Invoke-PSUScript. Is this a bug or is this intentional behaviour?
Thanks,
Tom
@insomniacc This isn't intentional. I've opened an issue for this because it should be usable.
Adam Driscoll
PowerShell Expert and Software Architect at Devolutions
Hello,
The fix has been implemented and is available in the latest version 2026.3.0.0 of PowerShell Universal.
Could you please confirm that this version works as expected now? We recommend testing this fix in a staging environment prior to deploying it on your production environment.
Thank you for your collaboration.
Best regards,
Maxim Robert