I am guessing that Start-Process will be used, but I am uncertain how exactly to accomplish these two things at once.
The user is a local user and is a member of Administrators.
Additionally there can be no user input required.
Update: Here is what I have tried and why it did not work. As Keith Suggested, I tried doing the following:
$passwd = ConvertTo-SecureString -AsPlainText "opensesame" -Force
$cred = new-object system.management.automation.pscredential 'John',$passwd
Start-Process powershell.exe -credential $cred
This did not launch the powershell window in administrator mode. Adding the runas verb does not work because start-process has two completely separate ways to call it, one of which takes -Verb as a parameter and one of which takes -Credential:
Start-Process [-FilePath] <string> [[-ArgumentList] <string[]>] [-Credential <PSCredential>] [-LoadUserProfile] [-NoNewWindow] [-PassThru] [-RedirectStandardError <string>] [-RedirectStandardInput <string>] [-RedirectStandardOutput <string>] [-UseNewEnvironment] [-Wait] [-WorkingDirectory <string>] [<CommonParameters>]
Start-Process [-FilePath] <string> [[-ArgumentList] <string[]>] [-PassThru] [-Verb <string>] [-Wait] [-WindowStyle {<Normal> | <Hidden> | <Minimized> | <Maximized>}] [-WorkingDirectory <string>] [<CommonParameters>]
This means that the following returns an error:
Start-Process powershell.exe -credential $cred -verb runas