Christine_Chavez_6412

How to run elevated commands without disabling UAC

Discussion created by Christine_Chavez_6412 on May 10, 2016
Latest reply on Oct 9, 2016 by Harriet_Kim_1764

Some jobs that run (eg)Powershell as administrator requires a  UAC prompt.
If disabling UAC or mimic disabling UAC on host ( set "User Account Control: Run all administrators in Admin Approval Mode" to "Disabled") is not an option on your company, then you can try some options below. 

Option A: Use the -Verb parameter of the Start-Process powershell command to run the process as admin
Link: http://ss64.com/ps/syntax-elevate.html
 
Option B: Add the executable to the Task Scheduler
Link: http://lifehacker.com/how-to-eliminate-uac-prompts-for-specific-applications-493128966 

 
Example for Powershell 1.0 
1) In Task Scheduler, right-click "Task Scheduler Library" and select "New Folder" Name it whatever you would like.

2) Select the new folder and click "Create Task" (not "Create Basic Task")

3) Name the task something descriptive. Enable "Run with highest privileges," and select your OS under "Configure for."

4) Under the Actions tab, select "Start a program" in the Action dropdown if it isn't already. Click Browse and find your app's .exe file (usually 4) under Program Files on your C: drive).

5) (Laptops) Under Conditions tab, deselect "Start the task only if the computer is on AC power."

6) On your desktop, right click and select New > Shortcut.

7) Paste 'C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe  /RUN /TN "Name of folder\Name of task" into the text box.


Outcomes