Condividi tramite


Azure PowerShell Tip

Many tutorials or operations call for the use of Windows Azure PowerShell cmdlets.  Assuming you have them installed via WebPI with the latest SDK, you might have noticed the Azure PowerShell shortcut simply sets the path to the commandlet module manifest file, and then imports the requisite modules.

I'm all about PS from the default cmd interpreter, so I usually Windows key and run "PowerShell" directly. By setting the Azure SDK PowerShell path the default PSModule path (which you can view by calling $env:PSModulePath at a PS prompt), you can simply do a "Get-Command *azure*" to autoload the relevant modules, while quickly listing some of the most common cmdlets you can use.

To set the latest SDK path, you can use $env:PSModulePath = $env:PSModulePath + ";C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\"

Enjoy!

Comments

  • Anonymous
    January 26, 2013
    Should have added, you can use filter matches to quickly find the correct commandlets: get-command azure | where {$_.Name -match "sub"}