1

How disable the security warning:

Run only scripts that you trust
While scripts from the Internet can be useful, this script can potentially harm your computer
Do you want to run in POWERSHELL

I have tried setting the policy to unrestricted.

The OS is windows server 2003.

The script which I'm trying to execute is in the network drive.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
user1383839
  • 215
  • 4
  • 12
  • What is the security policy after you set it? If you aren't elevated when running `Set-Executionpolicy`, the effects won't be seen when you run `Get-Executionpolicy`, in which case you need to set the policy as an administrator – jsvk Oct 24 '12 at 11:52

1 Answers1

2

Network locations are usually put in the same untrusted zone as the rest of the internet. You can add the location to your trusted sites or you can change the execution policy with Set-ExecutionPolicy from an elevated PowerShell.

Joey
  • 344,408
  • 85
  • 689
  • 683