Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is thee a way to make a all the scripts in a specific folder running without the need of the UAC prompt?

or maybe using power-shell to run the scripts without using "Set-ExecutionPolicy Unrestricted"

is there any way to just mark some scripts of the folder that contain them as trusted to run on the server?

share|improve this question
I've never left UAC enabled on a server, but I'm willing to accept that it may not be best practice. – Dan Nov 7 '11 at 10:52
well most of the servers are not administrated by us, it's for our customers, and I do not believe they would like to disable the UAC, some of them are very critical security must be maintained well !!!!! – Data-Base Nov 7 '11 at 11:01
most people say not to disable uac but MS has come up with a new KB on this subject – tony roth Nov 7 '11 at 15:17

I would disable UAC. It offers no actual protection and is 100% useless. You could also try right-clicking the file and setting the "Run as administrator" option. Also, depending on where the file came from, where you copied it, and what OS you are using, you may need to "unlock" the file.

Here's how to unlock a file:

  • Right click the file
  • Property
  • Tab "General"
  • Click on "unlock file"
share|improve this answer

you can mark shares and folders trusted like a website (configuration is in internet explorer), but that doesnt avoid UAC. UAC is not folder specific so the short answer to your question is "no".

also there is no "batch way" of elevating rights. BUT there are a few workarounds. one would be to make a shortcut on the bat and mark "run as admin" in the compatibility settings. more workarounds are possible, this question comes up every few days on stackoverflow, so you probably find an answer there

share|improve this answer
Thanks, I searched the internet for a solution, and I did not find something teat really helps us, but maybe if we signed our PS scripts that might help right? – Data-Base Nov 7 '11 at 10:57
sorry never worked with signed PS scripts – weberik Nov 7 '11 at 11:19

You might try Elevator, although I think this compromises the effectiveness of UAC.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.