Nick
Nick

Reputation: 290

How can I silently install Azure Az Powershell modules from the MSI file?

The MSI file can be seen here: https://github.com/Azure/azure-powershell/releases/tag/v1.4.0-February2019

How can I install this file quietly through a script? (I am doing this inside a Docker container). The older AzureRM commandlets install fine (from the same GitHub repo, version 6.13.1 for example), but this one fails without any error.

I've tried installing with

msiexec.exe /i "D:\Azure-Cmdlets-6.13.1.24243-x64.msi" /qn

which works. But for Az,

msiexec.exe /i "D:\Az-Cmdlets-1.4.0.26146-x64.msi" /qn

doesn't work!

I'm installing it into a vanilla container without AzureRM present, so there shouldn't be any conflict.

Upvotes: 2

Views: 1552

Answers (1)

Mark Iannucci
Mark Iannucci

Reputation: 135

I haven't tested this within a docker container yet, but the following command seems to be working on some VMs in my environment:

msiexec /i C:\temp\Az-Cmdlets-5.2.0.33762-x64.msi /QN /L*V "C:\temp\az.log" STARTAPP=1

I am doing some more tests to see if this will work on other machines. I will update my answer here if that STARTAPP=1 poses a problem and I need to find a better answer than this one.

I'm not sure why STARAPP=1 seems to work. I think it may have something to do with the way the package imports the other packages and it forces that to happen which then makes it work.

Upvotes: 0

Related Questions