Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking to do what's asked in this question: how to run a powershell script as administrator

The accepted answer says to use a shortcut. I'd like to do that, but when I get into Advanced Properties, everything is grayed out. How do I get around this?

share|improve this question
    
Can you please provide more information? Are you logged in with an unpriviledged account? Is the shortcut located on your desktop? –  Valentin Mar 16 '12 at 21:31

1 Answer 1

up vote 2 down vote accepted

The trick is to edit the Shortcut target to ADS powershell.exe in front of the script path so it looks like this:

powershell.exe "H:\Powershell\MyPoshScript.ps1"

Click OK, then go back into Properties and the ?Run as Administrator box will now be changeable.

(note: when I did this, Windows fixed the powershell.exe reference to the full path.

share|improve this answer
    
This worked great! –  notfed Mar 19 '12 at 17:03

Your Answer

 
discard

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.