From 7a2faab9286786098260ecdb110674947d11ecc4 Mon Sep 17 00:00:00 2001 From: Default User Date: Wed, 14 Feb 2024 22:30:59 +1100 Subject: [PATCH] get UEFI ISO built with ADK --- README.md | 2 +- ...tounattend-Dual-ISO-on-Windows-Worker.html | 58 +++++------------- ...unattend-Single-ISO-on-Windows-Worker.html | 58 +++++------------- ...unattend-Single-ISO-on-Windows-Worker.html | 60 ++++++------------- ...tounattend-Dual-ISO-on-Windows-Worker.html | 58 +++++------------- ...unattend-Single-ISO-on-Windows-Worker.html | 58 +++++------------- ...tounattend-Dual-ISO-on-Windows-Worker.html | 58 +++++------------- ...unattend-Single-ISO-on-Windows-Worker.html | 58 +++++------------- ...tounattend-Dual-ISO-on-Windows-Worker.html | 58 +++++------------- ...unattend-Single-ISO-on-Windows-Worker.html | 58 +++++------------- .../README.md | 2 + .../script.txt | 4 +- .../script.txt | 4 +- .../script.txt | 2 +- .../script.txt | 2 +- .../script.txt | 42 +++---------- .../metadata.json | 2 +- .../script.txt | 2 +- .../script.txt | 2 +- 19 files changed, 165 insertions(+), 423 deletions(-) diff --git a/README.md b/README.md index d96fb93..f26521d 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,6 @@ The Windows worker can run Linux commands using Windows Subsystem for Linux. | Name | Type | Script Reference | Comment | | ---- | ---- | ---------------- | ------- | | Automation Worker Windows Base Directory | Text | `automationworkerwindowsbasedirectory` | Base directory for deploying temporary files to build the ISO on a Windows Worker.

eg. "C:/attune_auto_installer" | -| Automation Worker Windows Base Directory Share Path | Text | `automationworkerwindowsbasedirectorysharepath` | eg. "/c$/attune_auto_installer" | | Automation Worker Windows Node | Windows Node | `automationworkerwindowsnode` | The Windows automation worker node used to perform tasks to create the ISO. | | Automation Worker Windows User: Administrator | Windows Credential | `automationworkerwindowsuseradministrator` | Administrator user on the Windows Automation Worker node. | | Drivers and Autounattend Drive Letter | Text | `driversandautounattenddriveletter` | The Windows drive letter containing the drivers and autounattend.xml as a single letter.

This will be different for each install method.
D for "Single ISO"
E for "Dual ISO"
X for "WinPE ISO" | @@ -156,6 +155,7 @@ The Windows worker can run Linux commands using Windows Subsystem for Linux. | Post Install Setup Script Drive Letter | Text | `postinstallsetupscriptdriveletter` | The Windows drive letter containing the Post Install PowerShell setup script post_install_setup.ps1 as a single letter as seen by the Windows installer.

This will be different for each install method.

D for "Single ISO"
E for "Dual ISO"
C for "WinPE ISO" | | Samba Server IP Address | Text | `sambaserveripaddress` | | | Windows Folder On Samba | Text | `windowsfolderonsamba` | The Windows folder on the Samba server. This parameter is used by startnet.cmd and can take these values:

- windows10
- windows2016
- windows2019
- windows2022 | +| Automation Worker Windows Base Directory Share Path | Text | `automationworkerwindowsbasedirectorysharepath` | Base directory for deploying temporary files to build the ISO on a Windows Worker.

eg. "/c$/attune_auto_installer" | diff --git a/docs/Create-Windows-10-(Win10)-autounattend-Dual-ISO-on-Windows-Worker.html b/docs/Create-Windows-10-(Win10)-autounattend-Dual-ISO-on-Windows-Worker.html index bccbbde..0f5b131 100644 --- a/docs/Create-Windows-10-(Win10)-autounattend-Dual-ISO-on-Windows-Worker.html +++ b/docs/Create-Windows-10-(Win10)-autounattend-Dual-ISO-on-Windows-Worker.html @@ -869,10 +869,10 @@

                 
-$DIR="C:\attuneautomationworker\build-{newOsNode.fqn}"
+$DIR="{automationWorkerWindowsBaseDirectory}\build-{newOsNode.fqn}"
 
 if (Test-Path $DIR) {
-    Remove-Path -Recursive $DIR
+    Remove-Item $DIR -Recurse -Force -Verbose
 }
                 
             
@@ -993,7 +993,7 @@

if (${{isBiosBoot}}) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" @@ -1081,7 +1081,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
 Set-Location $BUILD_DIR
@@ -1156,7 +1156,7 @@ 

if ( ${{isUefiBoot}} ) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" Set-Location $BUILD_DIR @@ -1225,7 +1225,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
 # This is so we place the "attune_wsl_create_bios_boot_iso.sh" outside the $BUILD_FOLDER
@@ -1327,49 +1327,23 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
-# This is so we place the "tmpBash.sh" outside the $BUILD_FOLDER
+# Set location to ISO_BUILD
 Set-Location $ISO_BUILD
 
 if ( ${{isUefiBoot}} ) {
+    $isoName = "kickstart_{newOsNode.fqn}.iso"
+    $bootData = "2#p0,e,b${BUILD_FOLDER}\boot\etfsboot.com#pEF,e,b${BUILD_FOLDER}\efi\microsoft\boot\efisys.bin"
 
-    $scriptContent=@"
-mkisofs \
-    -allow-limited-size \
-    -iso-level 4 \
-    -full-iso9660-filenames \
-    -rock \
-    -b boot/etfsboot.com \
-    -no-emul-boot \
-    -boot-load-seg 0 \
-    -boot-load-size 8 \
-    -hide boot.catalog \
-    -eltorito-alt-boot \
-    -no-emul-boot \
-    -b efi/microsoft/boot/efisys.bin \
-    -boot-load-size 1 \
-    -udf \
-    -untranslated-filenames \
-    -disable-deep-relocation \
-    -o kickstart_{newOsNode.fqn}.iso \
-    '${BUILD_FOLDER}'
-"@
-
-    # Replace CRLF with LF
-    $scriptContent = $scriptContent.replace("`r`n","`n")
-    
-    $FILE = "attune_wsl_create_uefi_boot_iso.sh"
-
-    Set-Content -Path $FILE -NoNewline -Value $scriptContent
-
-    wsl -d Ubuntu --user root --exec bash "${FILE}"
+    # Command to create UEFI compatible ISO
+    & "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe" `
+        -m -o -u2 -udfver102 -bootdata:$bootData "${BUILD_FOLDER}" $isoName
 
     if ($LASTEXITCODE -ne 0) {
-        Write-Error 'Failed to extract boot.img'
+        Write-Error 'Failed to create UEFI boot ISO'
     }
-
 } else {
     Write-Host "Skipping for BIOS boot."
 }
@@ -1551,12 +1525,12 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="${ISO_BUILD}\build-{newOsNode.fqn}"
 
 Set-Location "${BUILD_DIR}"
 
-$DRIVERS_DROP_IN_FOLDER = "C:\attuneautomationworker\drivers-{newOsNode.fqn}"
+$DRIVERS_DROP_IN_FOLDER = "{automationWorkerWindowsBaseDirectory}\drivers-{newOsNode.fqn}"
 $DESTINATION_DRIVERS_FOLDER = "drivers"
 
 if ( -Not (Test-Path "${DESTINATION_DRIVERS_FOLDER}") ) {
diff --git a/docs/Create-Windows-10-(Win10)-autounattend-Single-ISO-on-Windows-Worker.html b/docs/Create-Windows-10-(Win10)-autounattend-Single-ISO-on-Windows-Worker.html
index 1b5d59d..096f356 100644
--- a/docs/Create-Windows-10-(Win10)-autounattend-Single-ISO-on-Windows-Worker.html
+++ b/docs/Create-Windows-10-(Win10)-autounattend-Single-ISO-on-Windows-Worker.html
@@ -868,10 +868,10 @@ 

                 
-$DIR="C:\attuneautomationworker\build-{newOsNode.fqn}"
+$DIR="{automationWorkerWindowsBaseDirectory}\build-{newOsNode.fqn}"
 
 if (Test-Path $DIR) {
-    Remove-Path -Recursive $DIR
+    Remove-Item $DIR -Recurse -Force -Verbose
 }
                 
             
@@ -992,7 +992,7 @@

if (${{isBiosBoot}}) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" @@ -1080,7 +1080,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
 Set-Location $BUILD_DIR
@@ -1277,12 +1277,12 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="${ISO_BUILD}\build-{newOsNode.fqn}"
 
 Set-Location "${BUILD_DIR}"
 
-$DRIVERS_DROP_IN_FOLDER = "C:\attuneautomationworker\drivers-{newOsNode.fqn}"
+$DRIVERS_DROP_IN_FOLDER = "{automationWorkerWindowsBaseDirectory}\drivers-{newOsNode.fqn}"
 $DESTINATION_DRIVERS_FOLDER = "drivers"
 
 if ( -Not (Test-Path "${DESTINATION_DRIVERS_FOLDER}") ) {
@@ -1352,7 +1352,7 @@ 

if ( ${{isUefiBoot}} ) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" Set-Location $BUILD_DIR @@ -1421,7 +1421,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
 # This is so we place the "attune_wsl_create_bios_boot_iso.sh" outside the $BUILD_FOLDER
@@ -1523,49 +1523,23 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
-# This is so we place the "tmpBash.sh" outside the $BUILD_FOLDER
+# Set location to ISO_BUILD
 Set-Location $ISO_BUILD
 
 if ( ${{isUefiBoot}} ) {
+    $isoName = "kickstart_{newOsNode.fqn}.iso"
+    $bootData = "2#p0,e,b${BUILD_FOLDER}\boot\etfsboot.com#pEF,e,b${BUILD_FOLDER}\efi\microsoft\boot\efisys.bin"
 
-    $scriptContent=@"
-mkisofs \
-    -allow-limited-size \
-    -iso-level 4 \
-    -full-iso9660-filenames \
-    -rock \
-    -b boot/etfsboot.com \
-    -no-emul-boot \
-    -boot-load-seg 0 \
-    -boot-load-size 8 \
-    -hide boot.catalog \
-    -eltorito-alt-boot \
-    -no-emul-boot \
-    -b efi/microsoft/boot/efisys.bin \
-    -boot-load-size 1 \
-    -udf \
-    -untranslated-filenames \
-    -disable-deep-relocation \
-    -o kickstart_{newOsNode.fqn}.iso \
-    '${BUILD_FOLDER}'
-"@
-
-    # Replace CRLF with LF
-    $scriptContent = $scriptContent.replace("`r`n","`n")
-    
-    $FILE = "attune_wsl_create_uefi_boot_iso.sh"
-
-    Set-Content -Path $FILE -NoNewline -Value $scriptContent
-
-    wsl -d Ubuntu --user root --exec bash "${FILE}"
+    # Command to create UEFI compatible ISO
+    & "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe" `
+        -m -o -u2 -udfver102 -bootdata:$bootData "${BUILD_FOLDER}" $isoName
 
     if ($LASTEXITCODE -ne 0) {
-        Write-Error 'Failed to extract boot.img'
+        Write-Error 'Failed to create UEFI boot ISO'
     }
-
 } else {
     Write-Host "Skipping for BIOS boot."
 }
diff --git a/docs/Create-Windows-11-Workstation-(Win11)-autounattend-Single-ISO-on-Windows-Worker.html b/docs/Create-Windows-11-Workstation-(Win11)-autounattend-Single-ISO-on-Windows-Worker.html
index 08c59d8..6303a16 100644
--- a/docs/Create-Windows-11-Workstation-(Win11)-autounattend-Single-ISO-on-Windows-Worker.html
+++ b/docs/Create-Windows-11-Workstation-(Win11)-autounattend-Single-ISO-on-Windows-Worker.html
@@ -799,10 +799,10 @@ 

                 
-$DIR="C:\attuneautomationworker\build-{newOsNode.fqn}"
+$DIR="{automationWorkerWindowsBaseDirectory}\build-{newOsNode.fqn}"
 
 if (Test-Path $DIR) {
-    Remove-Path -Recursive $DIR
+    Remove-Item $DIR -Recurse -Force -Verbose
 }
                 
             
@@ -863,7 +863,7 @@

-/c$/attuneautomationworker/build-{newOsNode.fqn} +{automationWorkerWindowsBaseDirectorySharePath}/build-{newOsNode.fqn}, relative to the home directory
@@ -923,7 +923,7 @@

if (${{isBiosBoot}}) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" @@ -1011,7 +1011,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
 Set-Location $BUILD_DIR
@@ -1208,12 +1208,12 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="${ISO_BUILD}\build-{newOsNode.fqn}"
 
 Set-Location "${BUILD_DIR}"
 
-$DRIVERS_DROP_IN_FOLDER = "C:\attuneautomationworker\drivers-{newOsNode.fqn}"
+$DRIVERS_DROP_IN_FOLDER = "{automationWorkerWindowsBaseDirectory}\drivers-{newOsNode.fqn}"
 $DESTINATION_DRIVERS_FOLDER = "drivers"
 
 if ( -Not (Test-Path "${DESTINATION_DRIVERS_FOLDER}") ) {
@@ -1283,7 +1283,7 @@ 

if ( ${{isUefiBoot}} ) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" Set-Location $BUILD_DIR @@ -1352,7 +1352,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
 # This is so we place the "attune_wsl_create_bios_boot_iso.sh" outside the $BUILD_FOLDER
@@ -1454,49 +1454,23 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
-# This is so we place the "tmpBash.sh" outside the $BUILD_FOLDER
+# Set location to ISO_BUILD
 Set-Location $ISO_BUILD
 
 if ( ${{isUefiBoot}} ) {
+    $isoName = "kickstart_{newOsNode.fqn}.iso"
+    $bootData = "2#p0,e,b${BUILD_FOLDER}\boot\etfsboot.com#pEF,e,b${BUILD_FOLDER}\efi\microsoft\boot\efisys.bin"
 
-    $scriptContent=@"
-mkisofs \
-    -allow-limited-size \
-    -iso-level 4 \
-    -full-iso9660-filenames \
-    -rock \
-    -b boot/etfsboot.com \
-    -no-emul-boot \
-    -boot-load-seg 0 \
-    -boot-load-size 8 \
-    -hide boot.catalog \
-    -eltorito-alt-boot \
-    -no-emul-boot \
-    -b efi/microsoft/boot/efisys.bin \
-    -boot-load-size 1 \
-    -udf \
-    -untranslated-filenames \
-    -disable-deep-relocation \
-    -o kickstart_{newOsNode.fqn}.iso \
-    '${BUILD_FOLDER}'
-"@
-
-    # Replace CRLF with LF
-    $scriptContent = $scriptContent.replace("`r`n","`n")
-    
-    $FILE = "attune_wsl_create_uefi_boot_iso.sh"
-
-    Set-Content -Path $FILE -NoNewline -Value $scriptContent
-
-    wsl -d Ubuntu --user root --exec bash "${FILE}"
+    # Command to create UEFI compatible ISO
+    & "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe" `
+        -m -o -u2 -udfver102 -bootdata:$bootData "${BUILD_FOLDER}" $isoName
 
     if ($LASTEXITCODE -ne 0) {
-        Write-Error 'Failed to extract boot.img'
+        Write-Error 'Failed to create UEFI boot ISO'
     }
-
 } else {
     Write-Host "Skipping for BIOS boot."
 }
diff --git a/docs/Create-Windows-Server-2016-(Win2016)-autounattend-Dual-ISO-on-Windows-Worker.html b/docs/Create-Windows-Server-2016-(Win2016)-autounattend-Dual-ISO-on-Windows-Worker.html
index 84e8c6d..ebbe336 100644
--- a/docs/Create-Windows-Server-2016-(Win2016)-autounattend-Dual-ISO-on-Windows-Worker.html
+++ b/docs/Create-Windows-Server-2016-(Win2016)-autounattend-Dual-ISO-on-Windows-Worker.html
@@ -786,10 +786,10 @@ 

                 
-$DIR="C:\attuneautomationworker\build-{newOsNode.fqn}"
+$DIR="{automationWorkerWindowsBaseDirectory}\build-{newOsNode.fqn}"
 
 if (Test-Path $DIR) {
-    Remove-Path -Recursive $DIR
+    Remove-Item $DIR -Recurse -Force -Verbose
 }
                 
             
@@ -909,7 +909,7 @@

if (${{isBiosBoot}}) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" @@ -997,7 +997,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
 Set-Location $BUILD_DIR
@@ -1072,7 +1072,7 @@ 

if ( ${{isUefiBoot}} ) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" Set-Location $BUILD_DIR @@ -1141,7 +1141,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
 # This is so we place the "attune_wsl_create_bios_boot_iso.sh" outside the $BUILD_FOLDER
@@ -1243,49 +1243,23 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
-# This is so we place the "tmpBash.sh" outside the $BUILD_FOLDER
+# Set location to ISO_BUILD
 Set-Location $ISO_BUILD
 
 if ( ${{isUefiBoot}} ) {
+    $isoName = "kickstart_{newOsNode.fqn}.iso"
+    $bootData = "2#p0,e,b${BUILD_FOLDER}\boot\etfsboot.com#pEF,e,b${BUILD_FOLDER}\efi\microsoft\boot\efisys.bin"
 
-    $scriptContent=@"
-mkisofs \
-    -allow-limited-size \
-    -iso-level 4 \
-    -full-iso9660-filenames \
-    -rock \
-    -b boot/etfsboot.com \
-    -no-emul-boot \
-    -boot-load-seg 0 \
-    -boot-load-size 8 \
-    -hide boot.catalog \
-    -eltorito-alt-boot \
-    -no-emul-boot \
-    -b efi/microsoft/boot/efisys.bin \
-    -boot-load-size 1 \
-    -udf \
-    -untranslated-filenames \
-    -disable-deep-relocation \
-    -o kickstart_{newOsNode.fqn}.iso \
-    '${BUILD_FOLDER}'
-"@
-
-    # Replace CRLF with LF
-    $scriptContent = $scriptContent.replace("`r`n","`n")
-    
-    $FILE = "attune_wsl_create_uefi_boot_iso.sh"
-
-    Set-Content -Path $FILE -NoNewline -Value $scriptContent
-
-    wsl -d Ubuntu --user root --exec bash "${FILE}"
+    # Command to create UEFI compatible ISO
+    & "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe" `
+        -m -o -u2 -udfver102 -bootdata:$bootData "${BUILD_FOLDER}" $isoName
 
     if ($LASTEXITCODE -ne 0) {
-        Write-Error 'Failed to extract boot.img'
+        Write-Error 'Failed to create UEFI boot ISO'
     }
-
 } else {
     Write-Host "Skipping for BIOS boot."
 }
@@ -1467,12 +1441,12 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="${ISO_BUILD}\build-{newOsNode.fqn}"
 
 Set-Location "${BUILD_DIR}"
 
-$DRIVERS_DROP_IN_FOLDER = "C:\attuneautomationworker\drivers-{newOsNode.fqn}"
+$DRIVERS_DROP_IN_FOLDER = "{automationWorkerWindowsBaseDirectory}\drivers-{newOsNode.fqn}"
 $DESTINATION_DRIVERS_FOLDER = "drivers"
 
 if ( -Not (Test-Path "${DESTINATION_DRIVERS_FOLDER}") ) {
diff --git a/docs/Create-Windows-Server-2016-(Win2016)-autounattend-Single-ISO-on-Windows-Worker.html b/docs/Create-Windows-Server-2016-(Win2016)-autounattend-Single-ISO-on-Windows-Worker.html
index 5efb78a..6bbebf3 100644
--- a/docs/Create-Windows-Server-2016-(Win2016)-autounattend-Single-ISO-on-Windows-Worker.html
+++ b/docs/Create-Windows-Server-2016-(Win2016)-autounattend-Single-ISO-on-Windows-Worker.html
@@ -778,10 +778,10 @@ 

                 
-$DIR="C:\attuneautomationworker\build-{newOsNode.fqn}"
+$DIR="{automationWorkerWindowsBaseDirectory}\build-{newOsNode.fqn}"
 
 if (Test-Path $DIR) {
-    Remove-Path -Recursive $DIR
+    Remove-Item $DIR -Recurse -Force -Verbose
 }
                 
             
@@ -901,7 +901,7 @@

if (${{isBiosBoot}}) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" @@ -989,7 +989,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
 Set-Location $BUILD_DIR
@@ -1186,12 +1186,12 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="${ISO_BUILD}\build-{newOsNode.fqn}"
 
 Set-Location "${BUILD_DIR}"
 
-$DRIVERS_DROP_IN_FOLDER = "C:\attuneautomationworker\drivers-{newOsNode.fqn}"
+$DRIVERS_DROP_IN_FOLDER = "{automationWorkerWindowsBaseDirectory}\drivers-{newOsNode.fqn}"
 $DESTINATION_DRIVERS_FOLDER = "drivers"
 
 if ( -Not (Test-Path "${DESTINATION_DRIVERS_FOLDER}") ) {
@@ -1261,7 +1261,7 @@ 

if ( ${{isUefiBoot}} ) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" Set-Location $BUILD_DIR @@ -1330,7 +1330,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
 # This is so we place the "attune_wsl_create_bios_boot_iso.sh" outside the $BUILD_FOLDER
@@ -1432,49 +1432,23 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
-# This is so we place the "tmpBash.sh" outside the $BUILD_FOLDER
+# Set location to ISO_BUILD
 Set-Location $ISO_BUILD
 
 if ( ${{isUefiBoot}} ) {
+    $isoName = "kickstart_{newOsNode.fqn}.iso"
+    $bootData = "2#p0,e,b${BUILD_FOLDER}\boot\etfsboot.com#pEF,e,b${BUILD_FOLDER}\efi\microsoft\boot\efisys.bin"
 
-    $scriptContent=@"
-mkisofs \
-    -allow-limited-size \
-    -iso-level 4 \
-    -full-iso9660-filenames \
-    -rock \
-    -b boot/etfsboot.com \
-    -no-emul-boot \
-    -boot-load-seg 0 \
-    -boot-load-size 8 \
-    -hide boot.catalog \
-    -eltorito-alt-boot \
-    -no-emul-boot \
-    -b efi/microsoft/boot/efisys.bin \
-    -boot-load-size 1 \
-    -udf \
-    -untranslated-filenames \
-    -disable-deep-relocation \
-    -o kickstart_{newOsNode.fqn}.iso \
-    '${BUILD_FOLDER}'
-"@
-
-    # Replace CRLF with LF
-    $scriptContent = $scriptContent.replace("`r`n","`n")
-    
-    $FILE = "attune_wsl_create_uefi_boot_iso.sh"
-
-    Set-Content -Path $FILE -NoNewline -Value $scriptContent
-
-    wsl -d Ubuntu --user root --exec bash "${FILE}"
+    # Command to create UEFI compatible ISO
+    & "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe" `
+        -m -o -u2 -udfver102 -bootdata:$bootData "${BUILD_FOLDER}" $isoName
 
     if ($LASTEXITCODE -ne 0) {
-        Write-Error 'Failed to extract boot.img'
+        Write-Error 'Failed to create UEFI boot ISO'
     }
-
 } else {
     Write-Host "Skipping for BIOS boot."
 }
diff --git a/docs/Create-Windows-Server-2019-(Win2019)-autounattend-Dual-ISO-on-Windows-Worker.html b/docs/Create-Windows-Server-2019-(Win2019)-autounattend-Dual-ISO-on-Windows-Worker.html
index 4fb1274..0ee3228 100644
--- a/docs/Create-Windows-Server-2019-(Win2019)-autounattend-Dual-ISO-on-Windows-Worker.html
+++ b/docs/Create-Windows-Server-2019-(Win2019)-autounattend-Dual-ISO-on-Windows-Worker.html
@@ -786,10 +786,10 @@ 

                 
-$DIR="C:\attuneautomationworker\build-{newOsNode.fqn}"
+$DIR="{automationWorkerWindowsBaseDirectory}\build-{newOsNode.fqn}"
 
 if (Test-Path $DIR) {
-    Remove-Path -Recursive $DIR
+    Remove-Item $DIR -Recurse -Force -Verbose
 }
                 
             
@@ -909,7 +909,7 @@

if (${{isBiosBoot}}) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" @@ -997,7 +997,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
 Set-Location $BUILD_DIR
@@ -1072,7 +1072,7 @@ 

if ( ${{isUefiBoot}} ) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" Set-Location $BUILD_DIR @@ -1141,7 +1141,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
 # This is so we place the "attune_wsl_create_bios_boot_iso.sh" outside the $BUILD_FOLDER
@@ -1243,49 +1243,23 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
-# This is so we place the "tmpBash.sh" outside the $BUILD_FOLDER
+# Set location to ISO_BUILD
 Set-Location $ISO_BUILD
 
 if ( ${{isUefiBoot}} ) {
+    $isoName = "kickstart_{newOsNode.fqn}.iso"
+    $bootData = "2#p0,e,b${BUILD_FOLDER}\boot\etfsboot.com#pEF,e,b${BUILD_FOLDER}\efi\microsoft\boot\efisys.bin"
 
-    $scriptContent=@"
-mkisofs \
-    -allow-limited-size \
-    -iso-level 4 \
-    -full-iso9660-filenames \
-    -rock \
-    -b boot/etfsboot.com \
-    -no-emul-boot \
-    -boot-load-seg 0 \
-    -boot-load-size 8 \
-    -hide boot.catalog \
-    -eltorito-alt-boot \
-    -no-emul-boot \
-    -b efi/microsoft/boot/efisys.bin \
-    -boot-load-size 1 \
-    -udf \
-    -untranslated-filenames \
-    -disable-deep-relocation \
-    -o kickstart_{newOsNode.fqn}.iso \
-    '${BUILD_FOLDER}'
-"@
-
-    # Replace CRLF with LF
-    $scriptContent = $scriptContent.replace("`r`n","`n")
-    
-    $FILE = "attune_wsl_create_uefi_boot_iso.sh"
-
-    Set-Content -Path $FILE -NoNewline -Value $scriptContent
-
-    wsl -d Ubuntu --user root --exec bash "${FILE}"
+    # Command to create UEFI compatible ISO
+    & "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe" `
+        -m -o -u2 -udfver102 -bootdata:$bootData "${BUILD_FOLDER}" $isoName
 
     if ($LASTEXITCODE -ne 0) {
-        Write-Error 'Failed to extract boot.img'
+        Write-Error 'Failed to create UEFI boot ISO'
     }
-
 } else {
     Write-Host "Skipping for BIOS boot."
 }
@@ -1467,12 +1441,12 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="${ISO_BUILD}\build-{newOsNode.fqn}"
 
 Set-Location "${BUILD_DIR}"
 
-$DRIVERS_DROP_IN_FOLDER = "C:\attuneautomationworker\drivers-{newOsNode.fqn}"
+$DRIVERS_DROP_IN_FOLDER = "{automationWorkerWindowsBaseDirectory}\drivers-{newOsNode.fqn}"
 $DESTINATION_DRIVERS_FOLDER = "drivers"
 
 if ( -Not (Test-Path "${DESTINATION_DRIVERS_FOLDER}") ) {
diff --git a/docs/Create-Windows-Server-2019-(Win2019)-autounattend-Single-ISO-on-Windows-Worker.html b/docs/Create-Windows-Server-2019-(Win2019)-autounattend-Single-ISO-on-Windows-Worker.html
index 7bdfdf2..c54ce3e 100644
--- a/docs/Create-Windows-Server-2019-(Win2019)-autounattend-Single-ISO-on-Windows-Worker.html
+++ b/docs/Create-Windows-Server-2019-(Win2019)-autounattend-Single-ISO-on-Windows-Worker.html
@@ -778,10 +778,10 @@ 

                 
-$DIR="C:\attuneautomationworker\build-{newOsNode.fqn}"
+$DIR="{automationWorkerWindowsBaseDirectory}\build-{newOsNode.fqn}"
 
 if (Test-Path $DIR) {
-    Remove-Path -Recursive $DIR
+    Remove-Item $DIR -Recurse -Force -Verbose
 }
                 
             
@@ -901,7 +901,7 @@

if (${{isBiosBoot}}) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" @@ -989,7 +989,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
 Set-Location $BUILD_DIR
@@ -1186,12 +1186,12 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="${ISO_BUILD}\build-{newOsNode.fqn}"
 
 Set-Location "${BUILD_DIR}"
 
-$DRIVERS_DROP_IN_FOLDER = "C:\attuneautomationworker\drivers-{newOsNode.fqn}"
+$DRIVERS_DROP_IN_FOLDER = "{automationWorkerWindowsBaseDirectory}\drivers-{newOsNode.fqn}"
 $DESTINATION_DRIVERS_FOLDER = "drivers"
 
 if ( -Not (Test-Path "${DESTINATION_DRIVERS_FOLDER}") ) {
@@ -1261,7 +1261,7 @@ 

if ( ${{isUefiBoot}} ) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" Set-Location $BUILD_DIR @@ -1330,7 +1330,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
 # This is so we place the "attune_wsl_create_bios_boot_iso.sh" outside the $BUILD_FOLDER
@@ -1432,49 +1432,23 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
-# This is so we place the "tmpBash.sh" outside the $BUILD_FOLDER
+# Set location to ISO_BUILD
 Set-Location $ISO_BUILD
 
 if ( ${{isUefiBoot}} ) {
+    $isoName = "kickstart_{newOsNode.fqn}.iso"
+    $bootData = "2#p0,e,b${BUILD_FOLDER}\boot\etfsboot.com#pEF,e,b${BUILD_FOLDER}\efi\microsoft\boot\efisys.bin"
 
-    $scriptContent=@"
-mkisofs \
-    -allow-limited-size \
-    -iso-level 4 \
-    -full-iso9660-filenames \
-    -rock \
-    -b boot/etfsboot.com \
-    -no-emul-boot \
-    -boot-load-seg 0 \
-    -boot-load-size 8 \
-    -hide boot.catalog \
-    -eltorito-alt-boot \
-    -no-emul-boot \
-    -b efi/microsoft/boot/efisys.bin \
-    -boot-load-size 1 \
-    -udf \
-    -untranslated-filenames \
-    -disable-deep-relocation \
-    -o kickstart_{newOsNode.fqn}.iso \
-    '${BUILD_FOLDER}'
-"@
-
-    # Replace CRLF with LF
-    $scriptContent = $scriptContent.replace("`r`n","`n")
-    
-    $FILE = "attune_wsl_create_uefi_boot_iso.sh"
-
-    Set-Content -Path $FILE -NoNewline -Value $scriptContent
-
-    wsl -d Ubuntu --user root --exec bash "${FILE}"
+    # Command to create UEFI compatible ISO
+    & "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe" `
+        -m -o -u2 -udfver102 -bootdata:$bootData "${BUILD_FOLDER}" $isoName
 
     if ($LASTEXITCODE -ne 0) {
-        Write-Error 'Failed to extract boot.img'
+        Write-Error 'Failed to create UEFI boot ISO'
     }
-
 } else {
     Write-Host "Skipping for BIOS boot."
 }
diff --git a/docs/Create-Windows-Server-2022-(Win2022)-autounattend-Dual-ISO-on-Windows-Worker.html b/docs/Create-Windows-Server-2022-(Win2022)-autounattend-Dual-ISO-on-Windows-Worker.html
index 7d4b0b9..6e97eb2 100644
--- a/docs/Create-Windows-Server-2022-(Win2022)-autounattend-Dual-ISO-on-Windows-Worker.html
+++ b/docs/Create-Windows-Server-2022-(Win2022)-autounattend-Dual-ISO-on-Windows-Worker.html
@@ -786,10 +786,10 @@ 

                 
-$DIR="C:\attuneautomationworker\build-{newOsNode.fqn}"
+$DIR="{automationWorkerWindowsBaseDirectory}\build-{newOsNode.fqn}"
 
 if (Test-Path $DIR) {
-    Remove-Path -Recursive $DIR
+    Remove-Item $DIR -Recurse -Force -Verbose
 }
                 
             
@@ -909,7 +909,7 @@

if (${{isBiosBoot}}) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" @@ -997,7 +997,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
 Set-Location $BUILD_DIR
@@ -1072,7 +1072,7 @@ 

if ( ${{isUefiBoot}} ) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" Set-Location $BUILD_DIR @@ -1141,7 +1141,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
 # This is so we place the "attune_wsl_create_bios_boot_iso.sh" outside the $BUILD_FOLDER
@@ -1243,49 +1243,23 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
-# This is so we place the "tmpBash.sh" outside the $BUILD_FOLDER
+# Set location to ISO_BUILD
 Set-Location $ISO_BUILD
 
 if ( ${{isUefiBoot}} ) {
+    $isoName = "kickstart_{newOsNode.fqn}.iso"
+    $bootData = "2#p0,e,b${BUILD_FOLDER}\boot\etfsboot.com#pEF,e,b${BUILD_FOLDER}\efi\microsoft\boot\efisys.bin"
 
-    $scriptContent=@"
-mkisofs \
-    -allow-limited-size \
-    -iso-level 4 \
-    -full-iso9660-filenames \
-    -rock \
-    -b boot/etfsboot.com \
-    -no-emul-boot \
-    -boot-load-seg 0 \
-    -boot-load-size 8 \
-    -hide boot.catalog \
-    -eltorito-alt-boot \
-    -no-emul-boot \
-    -b efi/microsoft/boot/efisys.bin \
-    -boot-load-size 1 \
-    -udf \
-    -untranslated-filenames \
-    -disable-deep-relocation \
-    -o kickstart_{newOsNode.fqn}.iso \
-    '${BUILD_FOLDER}'
-"@
-
-    # Replace CRLF with LF
-    $scriptContent = $scriptContent.replace("`r`n","`n")
-    
-    $FILE = "attune_wsl_create_uefi_boot_iso.sh"
-
-    Set-Content -Path $FILE -NoNewline -Value $scriptContent
-
-    wsl -d Ubuntu --user root --exec bash "${FILE}"
+    # Command to create UEFI compatible ISO
+    & "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe" `
+        -m -o -u2 -udfver102 -bootdata:$bootData "${BUILD_FOLDER}" $isoName
 
     if ($LASTEXITCODE -ne 0) {
-        Write-Error 'Failed to extract boot.img'
+        Write-Error 'Failed to create UEFI boot ISO'
     }
-
 } else {
     Write-Host "Skipping for BIOS boot."
 }
@@ -1467,12 +1441,12 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="${ISO_BUILD}\build-{newOsNode.fqn}"
 
 Set-Location "${BUILD_DIR}"
 
-$DRIVERS_DROP_IN_FOLDER = "C:\attuneautomationworker\drivers-{newOsNode.fqn}"
+$DRIVERS_DROP_IN_FOLDER = "{automationWorkerWindowsBaseDirectory}\drivers-{newOsNode.fqn}"
 $DESTINATION_DRIVERS_FOLDER = "drivers"
 
 if ( -Not (Test-Path "${DESTINATION_DRIVERS_FOLDER}") ) {
diff --git a/docs/Create-Windows-Server-2022-(Win2022)-autounattend-Single-ISO-on-Windows-Worker.html b/docs/Create-Windows-Server-2022-(Win2022)-autounattend-Single-ISO-on-Windows-Worker.html
index 416a799..43db4b6 100644
--- a/docs/Create-Windows-Server-2022-(Win2022)-autounattend-Single-ISO-on-Windows-Worker.html
+++ b/docs/Create-Windows-Server-2022-(Win2022)-autounattend-Single-ISO-on-Windows-Worker.html
@@ -778,10 +778,10 @@ 

                 
-$DIR="C:\attuneautomationworker\build-{newOsNode.fqn}"
+$DIR="{automationWorkerWindowsBaseDirectory}\build-{newOsNode.fqn}"
 
 if (Test-Path $DIR) {
-    Remove-Path -Recursive $DIR
+    Remove-Item $DIR -Recurse -Force -Verbose
 }
                 
             
@@ -901,7 +901,7 @@

if (${{isBiosBoot}}) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" @@ -989,7 +989,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
 Set-Location $BUILD_DIR
@@ -1186,12 +1186,12 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="${ISO_BUILD}\build-{newOsNode.fqn}"
 
 Set-Location "${BUILD_DIR}"
 
-$DRIVERS_DROP_IN_FOLDER = "C:\attuneautomationworker\drivers-{newOsNode.fqn}"
+$DRIVERS_DROP_IN_FOLDER = "{automationWorkerWindowsBaseDirectory}\drivers-{newOsNode.fqn}"
 $DESTINATION_DRIVERS_FOLDER = "drivers"
 
 if ( -Not (Test-Path "${DESTINATION_DRIVERS_FOLDER}") ) {
@@ -1261,7 +1261,7 @@ 

if ( ${{isUefiBoot}} ) { - $ISO_BUILD="C:\attuneautomationworker" + $ISO_BUILD="{automationWorkerWindowsBaseDirectory}" $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}" Set-Location $BUILD_DIR @@ -1330,7 +1330,7 @@

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
 # This is so we place the "attune_wsl_create_bios_boot_iso.sh" outside the $BUILD_FOLDER
@@ -1432,49 +1432,23 @@ 

                 
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
-# This is so we place the "tmpBash.sh" outside the $BUILD_FOLDER
+# Set location to ISO_BUILD
 Set-Location $ISO_BUILD
 
 if ( ${{isUefiBoot}} ) {
+    $isoName = "kickstart_{newOsNode.fqn}.iso"
+    $bootData = "2#p0,e,b${BUILD_FOLDER}\boot\etfsboot.com#pEF,e,b${BUILD_FOLDER}\efi\microsoft\boot\efisys.bin"
 
-    $scriptContent=@"
-mkisofs \
-    -allow-limited-size \
-    -iso-level 4 \
-    -full-iso9660-filenames \
-    -rock \
-    -b boot/etfsboot.com \
-    -no-emul-boot \
-    -boot-load-seg 0 \
-    -boot-load-size 8 \
-    -hide boot.catalog \
-    -eltorito-alt-boot \
-    -no-emul-boot \
-    -b efi/microsoft/boot/efisys.bin \
-    -boot-load-size 1 \
-    -udf \
-    -untranslated-filenames \
-    -disable-deep-relocation \
-    -o kickstart_{newOsNode.fqn}.iso \
-    '${BUILD_FOLDER}'
-"@
-
-    # Replace CRLF with LF
-    $scriptContent = $scriptContent.replace("`r`n","`n")
-    
-    $FILE = "attune_wsl_create_uefi_boot_iso.sh"
-
-    Set-Content -Path $FILE -NoNewline -Value $scriptContent
-
-    wsl -d Ubuntu --user root --exec bash "${FILE}"
+    # Command to create UEFI compatible ISO
+    & "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe" `
+        -m -o -u2 -udfver102 -bootdata:$bootData "${BUILD_FOLDER}" $isoName
 
     if ($LASTEXITCODE -ne 0) {
-        Write-Error 'Failed to extract boot.img'
+        Write-Error 'Failed to create UEFI boot ISO'
     }
-
 } else {
     Write-Host "Skipping for BIOS boot."
 }
diff --git a/parameters/automationworkerwindowsbasedirectorysharepath/README.md b/parameters/automationworkerwindowsbasedirectorysharepath/README.md
index 9cd7d36..05fb9f7 100644
--- a/parameters/automationworkerwindowsbasedirectorysharepath/README.md
+++ b/parameters/automationworkerwindowsbasedirectorysharepath/README.md
@@ -1 +1,3 @@
+Base directory for deploying temporary files to build the ISO on a Windows Worker.
+
 eg. "/c$/attune_auto_installer"
\ No newline at end of file
diff --git a/steps/cleanupbuildfilesandisosonwindowsworker/script.txt b/steps/cleanupbuildfilesandisosonwindowsworker/script.txt
index 09aec8a..5af9161 100644
--- a/steps/cleanupbuildfilesandisosonwindowsworker/script.txt
+++ b/steps/cleanupbuildfilesandisosonwindowsworker/script.txt
@@ -1,5 +1,5 @@
-$DIR="C:\attuneautomationworker\build-{newOsNode.fqn}"
+$DIR="{automationWorkerWindowsBaseDirectory}\build-{newOsNode.fqn}"
 
 if (Test-Path $DIR) {
-    Remove-Path -Recursive $DIR
+    Remove-Item $DIR -Recurse -Force -Verbose
 }
diff --git a/steps/copydriversdropinfolderonwindowsworker/script.txt b/steps/copydriversdropinfolderonwindowsworker/script.txt
index a1455ad..7f23021 100644
--- a/steps/copydriversdropinfolderonwindowsworker/script.txt
+++ b/steps/copydriversdropinfolderonwindowsworker/script.txt
@@ -1,9 +1,9 @@
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="${ISO_BUILD}\build-{newOsNode.fqn}"
 
 Set-Location "${BUILD_DIR}"
 
-$DRIVERS_DROP_IN_FOLDER = "C:\attuneautomationworker\drivers-{newOsNode.fqn}"
+$DRIVERS_DROP_IN_FOLDER = "{automationWorkerWindowsBaseDirectory}\drivers-{newOsNode.fqn}"
 $DESTINATION_DRIVERS_FOLDER = "drivers"
 
 if ( -Not (Test-Path "${DESTINATION_DRIVERS_FOLDER}") ) {
diff --git a/steps/copyefisysnopromptbinintoefisysbinonwindowsworker/script.txt b/steps/copyefisysnopromptbinintoefisysbinonwindowsworker/script.txt
index beb1964..a966b1d 100644
--- a/steps/copyefisysnopromptbinintoefisysbinonwindowsworker/script.txt
+++ b/steps/copyefisysnopromptbinintoefisysbinonwindowsworker/script.txt
@@ -1,6 +1,6 @@
 if ( ${{isUefiBoot}} ) {
 
-    $ISO_BUILD="C:\attuneautomationworker"
+    $ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
     $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
     Set-Location $BUILD_DIR
diff --git a/steps/createbiosbootisoonwindowsworker/script.txt b/steps/createbiosbootisoonwindowsworker/script.txt
index 7b33ae0..2c833f9 100644
--- a/steps/createbiosbootisoonwindowsworker/script.txt
+++ b/steps/createbiosbootisoonwindowsworker/script.txt
@@ -1,4 +1,4 @@
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
 # This is so we place the "attune_wsl_create_bios_boot_iso.sh" outside the $BUILD_FOLDER
diff --git a/steps/createuefibootisoonwindowsworker/script.txt b/steps/createuefibootisoonwindowsworker/script.txt
index 06b1d2a..6d56d40 100644
--- a/steps/createuefibootisoonwindowsworker/script.txt
+++ b/steps/createuefibootisoonwindowsworker/script.txt
@@ -1,46 +1,20 @@
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_FOLDER="build-{newOsNode.fqn}"
 
-# This is so we place the "tmpBash.sh" outside the $BUILD_FOLDER
+# Set location to ISO_BUILD
 Set-Location $ISO_BUILD
 
 if ( ${{isUefiBoot}} ) {
+    $isoName = "kickstart_{newOsNode.fqn}.iso"
+    $bootData = "2#p0,e,b${BUILD_FOLDER}\boot\etfsboot.com#pEF,e,b${BUILD_FOLDER}\efi\microsoft\boot\efisys.bin"
 
-    $scriptContent=@"
-mkisofs \
-    -allow-limited-size \
-    -iso-level 4 \
-    -full-iso9660-filenames \
-    -rock \
-    -b boot/etfsboot.com \
-    -no-emul-boot \
-    -boot-load-seg 0 \
-    -boot-load-size 8 \
-    -hide boot.catalog \
-    -eltorito-alt-boot \
-    -no-emul-boot \
-    -b efi/microsoft/boot/efisys.bin \
-    -boot-load-size 1 \
-    -udf \
-    -untranslated-filenames \
-    -disable-deep-relocation \
-    -o kickstart_{newOsNode.fqn}.iso \
-    '${BUILD_FOLDER}'
-"@
-
-    # Replace CRLF with LF
-    $scriptContent = $scriptContent.replace("`r`n","`n")
-    
-    $FILE = "attune_wsl_create_uefi_boot_iso.sh"
-
-    Set-Content -Path $FILE -NoNewline -Value $scriptContent
-
-    wsl -d Ubuntu --user root --exec bash "${FILE}"
+    # Command to create UEFI compatible ISO
+    & "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\oscdimg.exe" `
+        -m -o -u2 -udfver102 -bootdata:$bootData "${BUILD_FOLDER}" $isoName
 
     if ($LASTEXITCODE -ne 0) {
-        Write-Error 'Failed to extract boot.img'
+        Write-Error 'Failed to create UEFI boot ISO'
     }
-
 } else {
     Write-Host "Skipping for BIOS boot."
 }
\ No newline at end of file
diff --git a/steps/deploywin11dvdisoonwindowsworker/metadata.json b/steps/deploywin11dvdisoonwindowsworker/metadata.json
index 78cf2ce..5566a48 100644
--- a/steps/deploywin11dvdisoonwindowsworker/metadata.json
+++ b/steps/deploywin11dvdisoonwindowsworker/metadata.json
@@ -1,7 +1,7 @@
 {
     "actionOnStepFail": "stop", 
     "archiveKey": "win11iso", 
-    "deployPath": "/c$/attuneautomationworker/build-{newOsNode.fqn}", 
+    "deployPath": "{automationWorkerWindowsBaseDirectorySharePath}/build-{newOsNode.fqn}", 
     "enabled": true, 
     "externalUuid4": "d1467c27-aa46-4b1d-a862-5407a56d5ab9", 
     "key": "deploywin11dvdisoonwindowsworker", 
diff --git a/steps/extractwindowsbootimgonwindowsworker/script.txt b/steps/extractwindowsbootimgonwindowsworker/script.txt
index 69a516b..f9d78ab 100644
--- a/steps/extractwindowsbootimgonwindowsworker/script.txt
+++ b/steps/extractwindowsbootimgonwindowsworker/script.txt
@@ -1,6 +1,6 @@
 if (${{isBiosBoot}}) {
 
-  $ISO_BUILD="C:\attuneautomationworker"
+  $ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
   $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
 
diff --git a/steps/extractwindowsisoonwindowsworker/script.txt b/steps/extractwindowsisoonwindowsworker/script.txt
index d3e4a34..6c2d8c7 100644
--- a/steps/extractwindowsisoonwindowsworker/script.txt
+++ b/steps/extractwindowsisoonwindowsworker/script.txt
@@ -1,4 +1,4 @@
-$ISO_BUILD="C:\attuneautomationworker"
+$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
 $BUILD_DIR="$ISO_BUILD\build-{newOsNode.fqn}"
 
 Set-Location $BUILD_DIR