start-process as Administrator

Hi all.

I have a .ps1 script which is working only if i’m opening the ISE as admin.

even i i loging as admin and open the ISE, it doesn’t works.

the issue is that i want to create a task to run the script and i don’t want to enter credentials every time which that is the situation when i’m inserting the “-verb RunAs” to my script.

please help.

You can set up the task to run with highest privileges … no need to explicitly do that in your script.