Powershell for Azure
If you’re like me, and need to get the Azure module installed on your Windows 10 machine, you may come accross some interesting gotchas on new builds that I thought this post could help with. I’m fine with JSON and it has it’s pros and cons. I’ve been working in IT for close to 30 years now and I’m much happier and can get things done quicker in Powershell until I can spend some time getting used to JSON a little more. The below worked for me but could differ depending on your install.
to add the module, in Powershell it’s as easy as
if you’re on a new build though you may need to do a few preliminary steps. if you get a message about requiring NuGet then you know what I mean. in some cases like if you have FIPS enabled, this can cause other errors. basically run through these commands to get it going.
check the current providers with
and you’ll likely get something like this
PowershellGet 184.108.40.206.1 cant handle FIPS so the easiest thing to do is upgrade that
iwr https://www.powershellgallery.com/api/v2/package/PackageManagement/220.127.116.11 -Outfile .\packagemanagement.18.104.22.168.nupkg
iwr https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -Outfile .\nuget.exe
$module_dir="C:\Windows\System32\WindowsPowerShell\v1.0\Modules\" ./nuget.exe install PackageManagement -Source $pwd ` -OutputDirectory $module_dir ` -Verbosity detailed may get warnings about dlls not available.
Rename-Item $module_dir/PackageManagement.22.214.171.124 $module_dir/PackageManagement