Upgrade Azure Stack HCI OS, version 22H2 via PowerShell
Article
Applies to: Azure Local, versions 23H2 and 22H2
This article describes how to upgrade the operating system (OS) for Azure Local from version 22H2 to version 23H2 via PowerShell. Upgrade using PowerShell is the recommended method to upgrade the OS
Throughout this article, we refer to OS version 23H2 as the new version and version 22H2 as the old version.
Important
To keep your Azure Local service in a supported state, you have up to six months to install this new OS version. The update is applicable to all Azure Local instances running version 22H2. We strongly recommend that you install this version as soon as it becomes available.
High-level workflow for the OS upgrade
The Azure Stack HCI operating system update is available via the Windows Update and via the media that you can download from the Azure portal.
To upgrade the OS on your system, follow these high-level steps:
You have access to an Azure Local running version 22H2.
The system is registered in Azure.
Make sure that all the machines in your Azure Local, version 22H2 instance are healthy and show as Online.
You have access to the Azure Stack HCI, version 23H2 OS software update for Azure Local. This update is available via Windows Update or as a downloadable media. The media is an ISO file that you can download from the Azure portal.
You have access to a client that can connect to your Azure Local instance. This client should be running PowerShell 5.0 or later.
Note
The ISO file is only required if the machines do not have access to Windows Update to download the OS feature update. If using this method, after you Connect to Azure Local, version 22H2, skip to step 6 under Step 2: Install new OS using PowerShell and perform the remaining steps.
Use of 3rd party tools to install upgrades is not supported.
Follow these steps to install the solution upgrade:
Step 1: Connect to Azure Local
Follow these steps on your client to connect to one of the machines of your Azure Local instance.
Run PowerShell as Administrator on the client that you're using to connect to your system.
Open a remote PowerShell session to a machine on your Azure Local instance. Run the following command and provide the credentials of your machine when prompted:
PS C:\Users\Administrator> $cred = Get-Credential
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
PS C:\Users\Administrator> Enter-PSSession -ComputerName "100.100.100.10" -Credential $cred
[100.100.100.10]: PS C:\Users\Administrator\Documents>
Step 2: Install new OS using PowerShell
To install the new OS using PowerShell, follow these steps:
Note
The following steps require the Cluster-Aware Updating (CAU) role to be installed and enabled on the system. For information on how to install and enable this feature on your Azure Local, see Cluster-Aware Updating overview.
Run the following cmdlets on every machine in the system.
Set-WSManQuickConfig
Enable-PSRemoting
To test whether the system is properly set up to apply software updates using Cluster-Aware Updating (CAU), run the Test-CauSetup cmdlet, which notifies you of any warnings or errors:
Test-CauSetup -ClusterName <System name>
Validate the hardware and settings by running the Test-Cluster cmdlet on one of the machines in the system. If any of the condition checks fail, resolve them before proceeding to the next step.
Inspect the output of the above cmdlet and verify that each machine is offered the same Feature Update, which should be the case.
You need a separate machine or VM outside the system to run the Invoke-CauRun cmdlet from. A separate machine ensures that orchestration isn't interrupted when the machines are rebooted.
Important
The system on which you run Invoke-CauRun must be running Windows Server 2022.
If the system isn't connected to Windows Update and the Azure Local install media is available on a local share, CAU can also be used to upgrade the system. Be sure to update the 'PathToSetupMedia' parameter with the share path to the ISO image.
As a Windows Server hybrid administrator, you integrate Windows Server environments with Azure services and manage Windows Server in on-premises networks.