Running PowerShell scripts from a UNC path without security warnings

Today I tried running a PowerShell script from a UNC path on a Windows 2003 server machine. Although I set the execution policy to “Unrestricted”, a security warning came up asking me whether I really wanted to execute the script:

Running a PowerShell script from a UNC path shows a security warning

I found the solution to this problem here: Running Scripts Downloaded from the Internet in comment 2466436. All I had to do is add the server to which the UNC path points to the “Local Intranet” zone:

Adding a server to the local intranet zone to be able to run PowerShell scripts without security warnings

Über Stefan

Polyglot Clean Code Developer

4 Kommentare

  1. You can use ExecutionPolicy Bypass if you really want to run unrestricted.

  2. @T: Ouch, I guess I need to use get-help more often 😉 You’re absolutely right!

  3. Hallo Peter, danke für den Tipp. Das werde ich mir mal anschauen.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see