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

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -