A lesson in powershell.

I typed this:

> iisreset

Which responded with this:

Access denied, you must be an administrator of the remote computer to use this command. Either have your account added to the administrator local group of the remote computer or to the domain administrator global group.

So I typed this:

> sudo iisreset

I was thinking this:

But got this:

sudo : The term 'sudo' is not recognized as the name of a cmdlet, function,  
script file, or operable program. Check the spelling of the name, or if a    
path was included, verify that the path is correct and try again.            
At line:1 char:1                                                             
+ sudo import-module webadministration                                       
+ ~~~~                                                                       
    + CategoryInfo          : ObjectNotFound: (sudo:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

So I added to my $PROFILE:

function invoke-assuperuser { Start-Process powershell -Verb runAs $args }
set-alias sudo invoke-assuperuser

Now I can:

> sudo iisreset

And it works (In a new window, via UAC)