How to download PowerShell Modules and register Azure Stack HCI Cluster to Azure with proxy configuration

Baldy, Marcin - Dell Team 1 Reputation point
2022-12-23T11:05:03.313+00:00

I’m working with a newly deployed 3-Node Azure Stack HCI OS cluster based on Dell AX-650 servers, with a proxy enabled in Azure Stack HCI OS to reach the internet.

Proxy configuration:

273697-image.png

We are able to reach most MS URLs through Test-NetConnection -ComputerName 'url' -Port 443. We were able to download and install Windows Updates and even register WAC (Windows Admin Center) in Azure.

Unfortunately, we are unable to register Azure Stack HCI Cluster with Azure, either from WAC or PowerShell. We are getting errors, that PowerShell cannot download required Modules. Once we copy the required Modules to C:\ProgramFiles\Windows Power Shell\Modules, we are facing other errors related to provided commands: Connect-AzAccount -Subscription xxx -Tenant xxx -DeviceAuth, Connect-AzAccount -UseDeviceAuthentication, Register-AzStackHCI.
273732-image.png

I assume the problem is related to PowerShell being unable to download proper Modules. Get-PsRepository gives me the output "WARNING: Unable to find module repository". After I run Register-PSRepository -Default and back again Get-PsRepository, there is no change.
273658-image.png

Kindly please help me with solving the PowerShell Modules issue, afterward with Azure Stack HCI Cluster registration in Azure. Thank you in advance.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
41,995 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Virender Singh Rawat 67 Reputation points
    2022-12-23T12:27:47.017+00:00

    Hi,

    in this case, you can download Azure CLI offline and also download AZ.STACKHCI module seperate computer and transfer to node..

    as per my knowledge, you don't need HCI Nodes to register. you can use your laptop to register HCI Cluster to Azure..

    Download Azure CLI on laptop

    Install-Module -Name Az.StackHCI.

    Connect-Azaccount

    Run the register command.

    1 person found this answer helpful.

  2. Virender Singh Rawat 67 Reputation points
    2022-12-23T11:09:55.797+00:00

    Hi,

    I would suggest to install Azure cli again if it was not install first.

    https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?tabs=azure-cli

    Install-Module -Name Az.StackHCI.

    then try...


  3. Marcin Baldy 1 Reputation point
    2023-01-11T15:05:04.72+00:00

    Hi,

    Right now we solved a problem with PowerShell Module download using a proxy. We can also register Azure Stack HCI Cluster in Azure, but during this process, we receive a problem with ARC agent registration. Arc Agent is successfully installed on all nodes but it cannot connect to azure. From the Azure portal in Resource Group we can see Cluster Nodes being registered but with Arc: Not installed. Testing with PS C:\Program Files\AzureConnectedMachineAgent> .\azcmagent.exe connect --location westeurope -g rg-arc-azhci-cluster-poc -s dc996c6a-0dad-40c5-9370-6b531fa52b23 -v we received following error message: AZCM0041: Failed To get Access Token. We verified with the troubleshooting guide: [https://learn.microsoft.com/en-us/azure-stack/hci/deploy/troubleshoot-hci-registration

    User's image

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.