Skip to content

Instantly share code, notes, and snippets.

@ogail
Created June 26, 2013 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ogail/5872856 to your computer and use it in GitHub Desktop.
Save ogail/5872856 to your computer and use it in GitHub Desktop.
This is the complete script for my blog post about the website diagnostic cmdlets in Windows Azure PowerShell
# Get the publish settings file for the subscription
Get-AzurePublishSettingsFile
# Import the *.publishsettings and make sure my default subscription is one I want
Import-AzurePublishSettingsFile c:\azure.publishsettings
# Create new website called adeek
New-AzureWebsite adeek
# Check the website
Show-AzureWebsite adeek
# Enable file system application diagnostics with verbose level
Enable-AzureWebsiteApplicationDiagnostic -Name adeek -File -LogLevel Verbose
# Getting the website information
Get-AzureWebsite adeek
# Start log streaming
Get-AzureWebsiteLog -Name adeek -Tail
# Enable application diagnostic on table storage
New-AzureStorageAccount adeekstorage -Location "West US"
Enable-AzureWebsiteApplicationDiagnostic -Name adeek -Storage -LogLevel Verbose -StorageAccountName adeekstorage
# Breaking out with logging
Disable-AzureWebsiteApplicationDiagnostic -Name adeek
# Cleanup (or angry!)
Remove-AzureWebsite adeek -Force
Remove-AzureStorageAccount adeekstorage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment