0

Does anyone know of installer links for AzureRM or Az Powershell modules ?

Install-Module will not work if you cannot access the Powershell Gallery. This is a real problem, since many sites do not allow production machines to access the internet from within the enclave (I have never worked for one). It seems to be a consistent issue with deployment models completely dependent on NuGet/nupkg files.

jlo-gmail
  • 4,453
  • 3
  • 37
  • 64

1 Answers1

0

Option 1: You can set up your own repository and use a machine with access to populate that repository from the online one. This can be as simple as a UNC share set up properly, then you can register that repository on the client machines e.g.

Register-PSRepository -Name MyRepo -SourceLocation "\\fserver\share" -InstallationPolicy Trusted 

All your isolated machines can use this repository by requesting the module with the repository name:

Install-Module -Name MyModule -Repository MyRepository

There's plenty of documentation on how to set up and publish to your own repository.

Option 2: Powershell modules are contained in folders under one of the module paths you can get from $env:PSModulePath variable.

You can download them onto a machine with access and copy them to the target machines by other means.

Scepticalist
  • 3,737
  • 1
  • 13
  • 30
  • Nice suggestion, I didn't know about this! – Ross Lyons Oct 03 '19 at 07:08
  • I knew this could be done, but what about the web of dependencies in many packages. It could take all day to create a local repository and get it to install – jlo-gmail Oct 03 '19 at 13:18
  • Down-voted because Register-PSRepository results in a request to run Install-PackageProvider -- which cannot be run, because there is no access to the Gallery -- chicken and the egg!! I am getting really POd with MS. There should be clean/simple/reliable installers to at least provide the infrastructure. I can probably hack this together, but I wanted a clean reliable machine -- and getting all this past IA is going to be a nightmare. – jlo-gmail Oct 03 '19 at 13:28
  • If you read my post, I mentioned that you need to read the documentation to set things up properly - you can get around this issue: https://learn.microsoft.com/en-us/powershell/module/packagemanagement/install-packageprovider?view=powershell-6 . You wanted to know how to do it, this is how. – Scepticalist Oct 03 '19 at 14:50