Welcome to Shaun Luttin's public notebook. It contains rough, practical notes. The guiding idea is that, despite what marketing tells us, there are no experts at anything. Sharing our half-baked ideas helps everyone. We're all just muddling thru. Find out more about our work at bigfont.ca.

Windows Azure PowerShell

Tags: azure, powershell, azure-websites

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

Links