I'm curious if I've got this right: Is Windows PowerShell 5.1 going to implement a mandatory user confirmation for any script that utilizes Invoke-WebRequest without the -UseBasicParsing flag? I came across a news article discussing this change and wanted to confirm if it's accurate. Any insights would be appreciated!
2 Answers
Exactly! It's a much-needed measure to reduce the risk of running potentially harmful scripts. Honestly, it's going to force a lot of people to double-check what they’re executing, which is a good thing! But yeah, it will slow down scripts that haven't been updated.
Yes, it looks like you’re right! Starting with the latest updates, PowerShell will indeed require confirmation for scripts using Invoke-WebRequest unless you specify -UseBasicParsing. This should help avoid mistakes made by running unverified scripts from the web. I've also decided to add `UseBasicParsing` to our `$PSDefaultParameterValues` to make our scripts safer. By the way, here’s a link to the official Microsoft announcement if you want more details: [Microsoft Announcement](https://support.microsoft.com/en-us/topic/powershell-5-1-preventing-script-execution-from-web-content-7cb95559-655e-43fd-a8bd-ceef2406b705).

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically