Skip to content

Instantly share code, notes, and snippets.

@writeameer
Created November 28, 2013 04:04
Show Gist options
  • Save writeameer/7687100 to your computer and use it in GitHub Desktop.
Save writeameer/7687100 to your computer and use it in GitHub Desktop.
# Enter-PSSession by default connects to 5985 (Insecure, HTTP)
# Azure by default, however, only opens up port 5986 which is for secure communications
# So just doing a Enter-PSSession <host> will likely fail complaining
# about network connectivity since 5985 is not open.
# Shortest (Insecure, HTTP)
# Assumes your local username/pwd same as Azure username/pawd
# Use Azure portal to create an endpoint for opening up port 5985
Enter-PSSession cloudmanvm1.cloudapp.net
# InSecure and specify user (Insecure, HTTP)
# Will prompt you for login dialog
# Use Azure portal to create an endpoint for opening up port 5985
Enter-PSSession cloudmanvm1.cloudapp.net -Credential ameer
# Secure (assuming listening endpoint is 5986 and ignoring CA check)
Enter-PSSession cloudmanvm1.cloudapp.net -Credential ameer -UseSSL -SessionOption (New-PSSessionOption -SkipCACheck)
# Secure (specify listening endpoint is 5986 and ignoring CA check)
Enter-PSSession cloudmanvm1.cloudapp.net -Credential ameer -Port 5986 -UseSSL -SessionOption (New-PSSessionOption -SkipCACheck)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment