Resolve issues caused by breaking changes to PSNativeCommandArgumentPassing
in PS 7.3+
#105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to changes with how PowerShell processes command-line arguments containing
"
characters.References:
Whilst the breaking change was introduced in PS v7.3, any systems that only use LTS versions of PowerShell won't have experienced it until they updated to v7.4.x. Azure DevOps is an example of this, having recently updated the PowerShell version on their hosted agents, which has brought the issue to prominence.
Updated Cmdlets:
Assert-AzCliLogin
- use legacyPSNativeCommandArgumentPassing
to workaround the above breaking changeInvoke-AzCli
- new switch-UseLegacyNativeCommandArgumentPassing
to enable ad-hoc workarounds for the above breaking changeInvoke-AzCliRestCommand
- uses the above new parameter to resolve errors when running on PowerShell 7.3+ under LinuxSet-TemporaryAzureResourceNetworkAccess
- fixes an issue with this cmdlet's KeyVault provider