Invoke-Command $using improvements by jborean93 · Pull Request #24025 · PowerShell/PowerShell
daxian-dbw
added
CL-Engine
and removed Review - Needed
The PR is being reviewed Indicates that a PR should be marked as an engine change in the Change Loglabels
Jul 29, 2025Amro1984 pushed a commit to Amro1984/PowerShell that referenced this pull request
Aug 12, 2025…ll#24025) Always use the v5.1 `$using:` logic when dealing with any connection type that is not based on the `WSManConnectionInfo`. This allows the caller to use the more advanced `$using` features like variables with special names, having `$using` vars inside sub scopes, and more. `WSMan` based connections might still communicate with older versions but as the oldest supported version is v3 on Server 2012. We don't need to keep the default as v2 (which has been deprecated) to support some of the newer features.
Amro1984 pushed a commit to Amro1984/PowerShell that referenced this pull request
Aug 12, 2025…ll#24025) Always use the v5.1 `$using:` logic when dealing with any connection type that is not based on the `WSManConnectionInfo`. This allows the caller to use the more advanced `$using` features like variables with special names, having `$using` vars inside sub scopes, and more. `WSMan` based connections might still communicate with older versions but as the oldest supported version is v3 on Server 2012. We don't need to keep the default as v2 (which has been deprecated) to support some of the newer features.
SIRMARGIN pushed a commit to SIRMARGIN/PowerShell that referenced this pull request
Dec 12, 2025…ll#24025) Always use the v5.1 `$using:` logic when dealing with any connection type that is not based on the `WSManConnectionInfo`. This allows the caller to use the more advanced `$using` features like variables with special names, having `$using` vars inside sub scopes, and more. `WSMan` based connections might still communicate with older versions but as the oldest supported version is v3 on Server 2012. We don't need to keep the default as v2 (which has been deprecated) to support some of the newer features.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters