You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$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.
The text was updated successfully, but these errors were encountered:
$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.
The text was updated successfully, but these errors were encountered: