Skip to content

Commit a841871

Browse files
authored
Merge pull request #4008 from ManikaDhiman/md-upgrade-tweaks
Revised upgrade docs to clarify ISO extracted content
2 parents d53a20a + 259e9ac commit a841871

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

azure-local/upgrade/upgrade-22h2-to-23h2-powershell.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Upgrade Azure Stack HCI OS, version 22H2 to version 23H2 via PowerShell
33
description: Learn how to use PowerShell to upgrade Azure Stack HCI OS, version 22H2 to version 23H2.
44
author: alkohli
55
ms.topic: how-to
6-
ms.date: 10/08/2025
6+
ms.date: 12/02/2025
77
ms.author: alkohli
88
ms.reviewer: alkohli
99
ms.service: azure-local
@@ -293,6 +293,24 @@ To install the new OS using PowerShell, follow these steps:
293293
Test-Cluster
294294
```
295295

296+
1. Extract the contents of the ISO image and copy them to the local system drive on each machine. Ensure that the local path is the same on each machine. Then, update the `PathToSetupMedia` parameter with the local path to the extracted ISO contents, not the ISO file.
297+
298+
```powershell
299+
# Define ISO and destination folder for extracted contents
300+
$isoFilePath = "C:\SetupFiles\WindowsServer\ISOs\example.iso"
301+
$destinationPath = "C:\SetupFiles\WindowsServer\ExtractedFilesFolder"
302+
# Mount the ISO file
303+
$iso = Mount-DiskImage -ImagePath $isoFilePath
304+
# Get the drive letter
305+
$driveLetter = ($iso | Get-Volume).DriveLetter
306+
# Create the destination directory
307+
New-Item -ItemType Directory -Path $destinationPath
308+
# Copy contents to the local directory
309+
Copy-Item -Path "${driveLetter}:\*" -Destination $destinationPath -Recurse
310+
# Dismount the ISO file
311+
Dismount-DiskImage -ImagePath $isoFilePath
312+
```
313+
296314
1. Check for the available updates:
297315

298316
```PowerShell
@@ -348,20 +366,20 @@ To install the new OS using PowerShell, follow these steps:
348366
Test-Cluster
349367
```
350368

351-
1. Extract the contents of the ISO image and copy them to the local system drive on each machine. Ensure that the local path is the same on each machine. Then, update the `PathToSetupMedia` parameter with the local path to the ISO image.
369+
1. Extract the contents of the ISO image and copy them to the local system drive on each machine. Ensure that the local path is the same on each machine. Then, update the `PathToSetupMedia` parameter with the local path to the extracted ISO contents, not the ISO file.
352370

353371
```powershell
354-
# Define ISO and destination paths
372+
# Define ISO and destination folder for extracted contents
355373
$isoFilePath = "C:\SetupFiles\WindowsServer\ISOs\example.iso"
356-
$destinationPath = "C:\SetupFiles\WindowsServer\Files"
374+
$destinationPath = "C:\SetupFiles\WindowsServer\ExtractedFilesFolder"
357375
# Mount the ISO file
358376
$iso = Mount-DiskImage -ImagePath $isoFilePath
359377
# Get the drive letter
360378
$driveLetter = ($iso | Get-Volume).DriveLetter
361379
# Create the destination directory
362380
New-Item -ItemType Directory -Path $destinationPath
363381
# Copy contents to the local directory
364-
Copy-Item -Path "${driveLetter}:\*" -Destination $destinationPath Recurse
382+
Copy-Item -Path "${driveLetter}:\*" -Destination $destinationPath -Recurse
365383
# Dismount the ISO file
366384
Dismount-DiskImage -ImagePath $isoFilePath
367385
```

0 commit comments

Comments
 (0)