Run remote commands in powershell
Run the following command to authencitate and execute commands remotely
$cred = Get-Credential -UserName administrator -Message "Enter Password"
Invoke-Command -ComputerName remote.host.or.ip -ScriptBlock {ipconfig /all} -Credential $cred