Windows Azure PowerShell
Workflows
Authenticate
Get-AzurePublishSettingsFile
Import-AzurePublishSettingsFile "C:\Users...\Long-Name.credentials.publishsettings"
The first command creates a new management certificate and downloads it to your computer. It’s helpful to store it for reuse. For now I’m storing mine in C:\Users\YOU\Documents\Azure. You can view management certificates in Azure Portal > SETTINGS > MANAGEMENT CERTIFICATES. The second command imports the certificate into your PS session.
If you don’t want to use a management certificate, you can authenticate with
Add-AzureAccount
Restart and Show a Website
Restart-AzureWebsite websiteName Show-AzureWebsite websiteName
Create and Show a Website
New-AzureWebsite website-name Show-AzureWebsite website-name
Some Other Commands
Get-Command *-AzureAccount
- Add-AzureAccount
- Get-AzureAccount
- Get-AzureSubscription
Get-Command *-AzureWebsite
- Get-AzureWebsite
- New-AzureWebsite
- Remove-AzureWebsite
- Restart-AzureWebsite
- Set-AzureWebsite
- Show-AzureWebsite
- Start-AzureWebsite
- Stop-AzureWebsite