Sunday, February 28, 2016

PowerShell - Import Module fails

I was trying to run a PowerShell command to connect to my azure instance and to my surprise the PS engine reported back error stating it can not find the command.. Interesting..

I started investigating what happened and tried importing the module directly and PS again threw an error:

Import-module : The specified module 'acbc' was not loaded because no valid module file was found in any module
At line:1 char:1
+ import-module acbc
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (acbc:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Now this was shocking.. the next obvious thing was to check the PowerShell module path in the System Environment to see if the module path includes the module i was trying to import..

here's the command to check the PS module path quickly


So, i checked the output and can see the module present but still i can't load it? hmm, now its really getting confusing..

I then ran Get-Module -ListAvailable and it just showed be VMware module only..huh!

so, i checked the environment variable under computer settings and found a PSMODULEPATH variable under user settings which was overriding system environment variable..

here's the quick fix:

Copy the path from the User Environment Variable to System Variable.. and remove the User variable. :)


Copy the PSmodules path to your User Environment variable if you want modules to be available to your account only.

Microsoft Azure Cost Estimator Tool

I am sure you need this to know the estimates for your cloud usage..

Although, the original bill may differ based on my and other's experience but this should give you a good start to understand the minimum bill you should see at the month end 

Azure Limits

Isn't it obvious that even cloud services would have a limit? Yeah, its true like other Cloud Services AZURE does have some limits. Some of it are kind of make sense, some needs to be improved and some yet to be explored...

Here's an article to help you understand Azure limits .. This is a good place to start when you want to design an Azure solution for your customer.