You know how if you\'re the administrative user of a system and you can just right click say, a batch script and run it as Administrator without entering the administrator p
I have found a way to do this...
Create a batch file to open your script:
@echo off
START "" "C:\Scripts\ScriptName.ps1"
Then create a shortcut, on your desktop say (right click New -> Shortcut).
Then paste this into the location:
C:\Windows\System32\runas.exe /savecred /user:*DOMAIN*\*ADMIN USERNAME* C:\Scripts\BatchFileName.bat
When first opening, you will have to enter your password once. This will then save it in the Windows credential manager.
After this you should then be able to run as administrator without having to enter a administrator username or password.