How can I stop PowerShell from making network calls at startup?

0
5
Asked By CuriousCoder123 On

Hey everyone! I've been having this issue where PowerShell takes a while to start up, showing nothing during boot and then suddenly loading after a few seconds. I suspect it's due to some sort of network call since my internet connection is pretty unreliable here in Iran. It feels like it might be checking for updates or something related to licensing. I'm curious if there's a way to prevent these network calls from happening at startup. Any help would be greatly appreciated!

3 Answers

Answered By TechSavvy101 On

You can disable the startup network calls by setting a couple of environment variables. Check out the documentation for environment variables, and specifically set `$env:POWERSHELL_UPDATECHECK` to 'Off' and `$env:POWERSHELL_TELEMETRY_OPTOUT` to 'true' or '1'. It's best to do this as a persistent user-level environment variable using the GUI or system calls since these checks occur before your profile scripts are loaded.

Answered By DevGuru444 On

Exactly! Just to clarify, set it like this:

```
[System.Environment]::SetEnvironmentVariable('POWERSHELL_UPDATECHECK', 'Off', 'User')
[System.Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '1', 'User')
```
This way, it should prevent those annoying checks at startup. If you also use WSL, make sure to use the WSLENV variable to have those settings available across environments.

Answered By HelpfulHacker On

Thanks for the tips! Just wanted to add that while many prefer ChatGPT for AI responses, I find I often need to cross-reference with other sources for accuracy. Plus, tools like Grok can pull data from multiple sites at once, which is a big win!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.