From 2a94acfbf7f275d1da6a2115692da3f65954d213 Mon Sep 17 00:00:00 2001 From: ChrisFDSTech <146366279+ChrisFDSTech@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:04:18 -0400 Subject: [PATCH 1/3] Update createVM.ps1 Corrected spelling --- Hyper-V/createVM.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Hyper-V/createVM.ps1 b/Hyper-V/createVM.ps1 index 248375c..fcd532d 100644 --- a/Hyper-V/createVM.ps1 +++ b/Hyper-V/createVM.ps1 @@ -84,8 +84,8 @@ log "Temporarily setting VM name to $VMName" log "Copying the $version disk from $templates..." try { - Copy-Item -Path "$($tempaltes)\GM-$($version).vhdx" -Destination "$($virtualHardDisks)\$($VMName).vhdx" -Force | Out-Null - log "Disk coppied to $virtualHardDisks" + Copy-Item -Path "$($templates)\GM-$($version).vhdx" -Destination "$($virtualHardDisks)\$($VMName).vhdx" -Force | Out-Null + log "Disk copied to $virtualHardDisks" } catch { @@ -123,7 +123,7 @@ log "New VM Name will be $newName" try { - Renamve-VM -Name $VMName -NewName $newVMName + Rename-VM -Name $VMName -NewName $newVMName log "VM renamed to $newVMName" } catch From a75f44899d114c2c3fe00edd7446977947a992c2 Mon Sep 17 00:00:00 2001 From: ChrisFDSTech <146366279+ChrisFDSTech@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:35:19 -0500 Subject: [PATCH 2/3] Create OOBEcheck.ps1 --- OOBEcheck.ps1 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 OOBEcheck.ps1 diff --git a/OOBEcheck.ps1 b/OOBEcheck.ps1 new file mode 100644 index 0000000..6b1af6d --- /dev/null +++ b/OOBEcheck.ps1 @@ -0,0 +1,27 @@ +[string]$AutoPilotSettingsKey = 'HKLM:\SOFTWARE\Microsoft\Provisioning\AutopilotSettings' +[string]$DevicePrepName = 'DevicePreparationCategory.Status' +[string]$DeviceSetupName = 'DeviceSetupCategory.Status' +[bool]$DevicePrepNotRunning = $false +[bool]$DeviceSetupNotRunning = $false + +$DevicePrepDetails = (Get-ItemProperty -Path $AutoPilotSettingsKey -Name $DevicePrepName -ErrorAction 'Ignore').$DevicePrepName +$DeviceSetupDetails = (Get-ItemProperty -Path $AutoPilotSettingsKey -Name $DeviceSetupName -ErrorAction 'Ignore').$DeviceSetupName + +if (-not [string]::IsNullOrEmpty($DevicePrepDetails)) { + $DeviceSetupDetails = $DeviceSetupDetails | ConvertFrom-Json +} +else { + Write-Output "No_Autopilot_Config" + Exit +} + + +if ($DeviceSetupDetails.categoryState -eq "inProgress") { + Write-Output "ESP_Running" + Exit +} +else { + Write-Output "ESP_NotRunning" + Exit +} + From 36a66a6b07fdc3e20e9f1f5828cfcb71378aadd4 Mon Sep 17 00:00:00 2001 From: ChrisFDSTech <146366279+ChrisFDSTech@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:36:29 -0500 Subject: [PATCH 3/3] Rename OOBEcheck.ps1 to checkforOOBE.ps1 --- OOBEcheck.ps1 => checkforOOBE.ps1 | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename OOBEcheck.ps1 => checkforOOBE.ps1 (100%) diff --git a/OOBEcheck.ps1 b/checkforOOBE.ps1 similarity index 100% rename from OOBEcheck.ps1 rename to checkforOOBE.ps1