$Credential = Get-Credential
Invoke-Command -ComputerName $Computer -ScriptBlock {Stop-Service -Name Bits} -Credential $Credential
Use to run a single command or script on a remote machine with different credentials than the running user.
$Credential = Get-Credential
Invoke-Command -ComputerName $Computer -ScriptBlock {Stop-Service -Name Bits} -Credential $Credential
Details