redirect - Send a command to a powershell opened with "Start-Process powershell -Verb runas" -
i want open admin powershell , send command (eventually script). right now, doesn't matter command, i've tried things like:
start-process powershell -verb runas < $something
or
$something | start-process powershell -verb runas
just text show in new admin powershell window. ideas?
that awkward moment when little more research , find want: link anyone: how execute set of commands in elevated mode of powershell
essentially, add -argument argument command
start-process powershell -verb runas -argument dir
Comments
Post a Comment