I'm trying to run some commands on a remote computer with elevated privileges;
You do that with Invoke-Command. This example shows how to test if the account you are using has Administrator access.
$sb = {
$admin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
"Running on {0}" -f $env:COMPUTERNAME
"Your name is {0}" -f $env:USERNAME
"Admin level is {0}" -f $admin
}
$User = ".\admin"
$PWord = ConvertTo-SecureString -String "admin" -AsPlainText -Force
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord
Invoke-Command -ComputerName test10 -ScriptBlock $sb -Credential $Credential