Created
August 17, 2015 12:06
-
-
Save papsl/7f499e4690a58e885319 to your computer and use it in GitHub Desktop.
Azure - Open PowerShell session to Azure Virtual Machine (complete with publish settings)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Download file | |
Get-AzurePublishSettingsFile | |
#Import Publishing file | |
Import-AzurePublishSettingsFile -PublishSettingsFile "publishsettingsfile.publishsettings" | |
#List all profiles | |
Get-AzureSubscription | |
#Select active AzureSubscription | |
Select-AzureSubscription "Visual Studio Premium with MSDN" | |
# Start machine | |
Start-AzureVM -Service "ServiceName" -Name "ServerName" | |
# Open PowerShell command session to VM | |
Enter-PSSession -ConnectionUri (Get-AzureWinRMUri) -SessionOption (New-PSSessionOption -SkipCACheck) -Credential (Get-Credential) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment