Skip to content

Make Sandbox script work in PowerShell 5 #247924

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

Merged
merged 2 commits into from
Apr 21, 2025
Merged

Conversation

mdanish-kh
Copy link
Contributor

@mdanish-kh mdanish-kh commented Apr 13, 2025

List of stuff not supported in PS5:

  • Ternary operator (?)
  • -AdditionalPath param for Join-Path cmdlet
  • Doesn't support piping into Write-Information
  • Requires the assembly to be loaded before using it (either with using assembly System.Net.Http or Add-Type)

Manually validated that the script works with the changes.

cc @Trenly @jedieaston


Microsoft Reviewers: Open in CodeFlow

@mdanish-kh mdanish-kh requested review from denelon and a team as code owners April 13, 2025 17:03
@wingetbot
Copy link
Collaborator

Service Badge  Service Badge  

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Attention This work item needs to be reviewed by a member of the core team. label Apr 13, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Attention This work item needs to be reviewed by a member of the core team. label Apr 13, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Moderator-Approved One of the Moderators has reviewed and approved this PR label Apr 13, 2025
@mdanish-kh
Copy link
Contributor Author

[Policy] Needs-Manual-Merge

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Manual-Merge The pull request requires a manual merge from a repository maintainer Needs-Attention This work item needs to be reviewed by a member of the core team. labels Apr 13, 2025
Copy link
Contributor

@jedieaston jedieaston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@denelon denelon merged commit a97b417 into microsoft:master Apr 21, 2025
2 checks passed
@mdanish-kh mdanish-kh deleted the fix-ps5 branch April 21, 2025 19:53
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Attention This work item needs to be reviewed by a member of the core team. label Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Moderator-Approved One of the Moderators has reviewed and approved this PR Needs-Manual-Merge The pull request requires a manual merge from a repository maintainer Project-File
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants