Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Wrapper to Designate $PSDefaultParameterValues - PS7 Remoting, Silent Credentials, etc. #28

Open
nkasco opened this issue Nov 23, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@nkasco
Copy link
Owner

nkasco commented Nov 23, 2022

$PSDefaultParameterValues is a very powerful feature when used correctly, seeking wrapper functionality to sit between invocation click and actual script launch to enable backwards compatibility of scripts written for Windows PowerShell.

For example: WinRM Remoting by default will use PowerShell 5 in the remote session even if invoked from a PowerShell 7 session. As long as the remote endpoint has PS7 WinRM endpoint remoting enabled, you can pass -ConfigurationName as a parameter to run the remote session in PS7.

The same approach could be taken for ConfigurationName, Credential, or any other parameter that you'd like to default to improve UX.

Since many admins have already written scripts for PS5, this may help users get to the latest PS7 version faster.

Goal: Create a UI editor to allow the designation of these parameters, their argument values, and what cmdlets they should be tied to. Then provide a valve to use this wrapper on a per-script basis in the script XML.

@nkasco nkasco added enhancement New feature or request help wanted Extra attention is needed labels Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant