# Powershell security warning popup

**URL:** <https://forums.powershell.org/t/powershell-security-warning-popup/25580>\
**Category:** PowerShell Help\
**Created:** [March 15, 2025, 5:04am UTC](https://forums.powershell.org/t/powershell-security-warning-popup/25580 "2025-03-15T05:04:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdubrox](https://avatars.discourse-cdn.com/v4/letter/g/d26b3c/32.png) [@gdubrox](https://forums.powershell.org/u/gdubrox)\
**Post date:** [March 15, 2025, 5:04am UTC](https://forums.powershell.org/t/powershell-security-warning-popup/25580/1 "2025-03-15T05:04:56Z")

</div>

In our environment we had folder redirection on by GPO and when I would open PowerShell I would get this Security Warning error.

Security warning

Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust this

script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run ?

[D] Do not run [R] Run once [S] Suspend [?] Help (default is “D”):

After doing a lot of research I found these solutions:

**Without a GPO:**  
Configure Network Share as a Trusted Zone (for network scripts):

Control Panel \> Internet Options: Open Internet Options, navigate to the “Security” tab, and add the network share (e.g., `\\networkshare`) to the “Local intranet” security zone.

Add to Trusted Sites: Alternatively, you can add the network share to the trusted sites list using the `file://` protocol (e.g., `file://\\networkshare`). **I did this option in our GPO**

**With GPO:**  
I added the fqdn of the server that my profile was being redirected to under:  
Computer Configuration \> Policies \> Administrative Templates \> Windows Components \> Internet Explorer \> Internet Control Panel \> Security Page  
Enable Site to Zone Assignment List  
Add:  
Value name: file://server\_fqdn  
Value: 1

Then open command prompt and run gpupdate /force and reopen PowerShell. Popup should disappear

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [March 15, 2025, 9:29am UTC](https://forums.powershell.org/t/powershell-security-warning-popup/25580/2 "2025-03-15T09:29:42Z")

</div>

Greg,  
Welcome to the forum. 👋🏼

Do you have any question? Or did you just want to share this with the world? 😉

And please … When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( \</\> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

[Guide to Posting Code - Redux](https://forums.powershell.org/t/guide-to-posting-code-redux/15797) \<---- Click 👆🏽 😉

( !! Sometimes the _preformatted text_ button hides behind the settings gear symbol. 😉 )

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [April 14, 2025, 9:29am UTC](https://forums.powershell.org/t/powershell-security-warning-popup/25580/3 "2025-04-14T09:29:56Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
