Using Powershell under useraccount to open another tool as a useraccount

0

I have a Powershell script that opens another program and my overall goal is to run these under a currentuser account, rather than a system account. For now I have the following.

The below works well however, it opens a “user account control” popup which I’m trying to avoid. Any suggestions would be greatly appreciated.

'override wait
hidden=true
Completion=process
runas=currentuser wait powershell.exe /C “C:\Drivers\examplescript.ps1” /SILENT /SP /Norestart ’

"With UAC, each application that requires the administrator access token must prompt the end user for consent"

What does your PowerShell Script trying to do?
I think it’s trying to start an elevated process

The only options I’ve found that both execute as the user, and run elevated, require you to supply the user’s password.

It is possible to run as LocalSystem, elevated, while providing an interface to the logged-on user; this is dangerous from a security perspective because a graphical installer might provide a way for the user to elevate their privilege, so that should be used with care.

The options I’ve found are summarized at Tip - Action Override User settings

1 Like