Does it have to be a script?

You can trivially generate an executable in C# with a manifest to require 
elevation, given you are using PowerShell you can certainly replicate the 
functionality in C#...

jlc

From: [email protected] [mailto:[email protected]] On 
Behalf Of James Rankin
Sent: Wednesday, August 31, 2016 10:45 AM
To: [email protected]
Subject: [NTSysADM] More PowerShell help

How can I get a PowerShell script to run with administrative privileges?

I have a configuration script I want to run on my Windows 10 machines, 
obviously it is going to be run by an admin user, but I want to just 
double-click the script and it runs with admin privileges. At the minute I have 
to launch PowerShell as an admin and then run the script directly - what's the 
best way to be able to do this with a simple double-click action?

Cheers,


James Rankin
EUC Solutions Architect | 07809 668579 | [email protected]<mailto:[email protected]>
One Trinity Green, Eldon Street, South Shields, Tyne & Wear, NE33 1SA
Tel: 0191 481 3446


Reply via email to