Monday 31 October 2011

Elegantly testing for a PowerShell Snap-In

This PowerShell script tries to load the WAPPSCmdlets snap-in, fails silently if the loading of the snap-in fails (if it isn’t installed), advises the user and exits from the script.

if ((Get-PSSnapin | ?{$_.Name -eq "WAPPSCmdlets"}) -eq $null)
{
  Add-PSSnapin WAPPSCmdlets -erroraction SilentlyContinue
  $SnapIn = GET-PSSnapIn WAPPSCmdlets -erroraction SilentlyContinue
  if ($SnapIn -eq $null)
  {
    Write-Error "To run this script the 'Windows Azure Platform PowerShell Cmdlets' are required."
    Write-Error "Please download from '
http://wappowershell.codeplex.com/' and install as a PowerShell Snap-in (not as a Module)."
    Exit
  }
}

I’m testing for “WAPPSCmdlets” but you could test for any PowerShell Snap-in.

Simples (if you don’t get it).


Saturday 22 October 2011

Increasing quotas on Windows Azure

By default, your subscription quotas on Windows Azure are as follows:

  • Cores – 20
  • Hosted Services – 6
  • Storage – 5

To increase these you need to submit a request: https://support.microsoft.com/oas/default.aspx?prid=13185&st=1

Options:

  • Support topic – “Service Deployment and Developer Portal”
  • Sub-topic – “Quota increase”

About Me