Skip to content

Instantly share code, notes, and snippets.

@adamjasinski
Created January 5, 2015 15:26
Show Gist options
  • Save adamjasinski/ef8fc71382787d305f90 to your computer and use it in GitHub Desktop.
Save adamjasinski/ef8fc71382787d305f90 to your computer and use it in GitHub Desktop.
$computerName = "someazurevm.cloudapp.net"
$userName = "CONTOSO\myuser"
$password = "secret"
$cred = New-Object System.Management.Automation.PSCredential $userName, $(ConvertTo-SecureString $password -AsPlainText -Force)
Invoke-Command -ComputerName $computerName -Credential $cred -Port 62397 -UseSSL -FilePath .\deploy\MyUpgradeScript.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment