diff --git a/autounattend.xml b/autounattend.xml index 5dc5c8d..738568f 100644 --- a/autounattend.xml +++ b/autounattend.xml @@ -1,16 +1,19 @@ - - - - - + + + + + 00000-00000-00000-00000-00000 - Always + Always + true @@ -44,7 +47,7 @@ - + @@ -54,7 +57,7 @@ 2 - Loads the Default User Registry Hive so Changes Can be Made to It + Loads the Default User Registry Hive so Changes Can be Made to It reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT" @@ -73,59 +76,58 @@ powershell.exe -NoProfile -Command "Get-Content -LiteralPath '%TEMP%\remove-features.ps1' -Raw | Invoke-Expression;" - 6 - Run Chris Titus WinUtil Tweaks - cmd.exe /c "powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\wintweaks.ps1' -Raw | Invoke-Expression;" >>"C:\Windows\Setup\Scripts\wintweaks.log" 2>&1" + 6 + Run Chris Titus WinUtil Tweaks + cmd.exe /c "powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\wintweaks.ps1' -Raw | Invoke-Expression;" >>"C:\Windows\Setup\Scripts\wintweaks.log" 2>&1" 7 Executes the HKLM Registry Entries Script cmd.exe /c "C:\Windows\Setup\Scripts\localmachine.cmd >>"C:\Windows\Setup\Scripts\localmachine.log" 2>&1" - + 8 - Registry Entry to Execute the HKCU Registry Entry Script the First Time a New User Logs In + Registry Entry to Execute the HKCU Registry Entry Script the First Time a New User Logs In reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "currentuser" /t REG_SZ /d "C:\Windows\Setup\Scripts\currentuser.cmd" /f - + 9 - Registry Entry to Execute the HKU\DefaultUser Registry Entries Script + Registry Entry to Execute the HKU\DefaultUser Registry Entries Script cmd.exe /c "C:\Windows\Setup\Scripts\defaultuser.cmd >>"C:\Windows\Setup\Scripts\defaultuser.log" 2>&1" 10 - Executes the EdgeRemoval batch file + Executes the EdgeRemoval batch file cmd.exe /c "C:\Windows\Setup\Scripts\edgeremoval.bat >>"C:\Windows\Setup\Scripts\edgeremoval.log" 2>&1" 11 - Adds Take Ownership to the Right Click Context Menu + Adds Take Ownership to the Right Click Context Menu cmd.exe /c "reg.exe import "C:\Windows\Setup\Scripts\take-ownership.reg" >>"C:\Windows\Setup\Scripts\take-ownership.log" 2>&1" 12 - Unloads the Default User Registry Hive + Unloads the Default User Registry Hive reg.exe unload "HKU\DefaultUser" - + - - - true - true - true - true - Work - 3 - - - - - + + + true + true + true + true + Work + 3 + + + + param( @@ -148,8 +150,7 @@ foreach( $file in $Document.unattend.Extensions.File ) { [System.IO.File]::WriteAllBytes( $path, ( $encoding.GetPreamble() + $encoding.GetBytes( $file.InnerText.Trim() ) ) ); } - - + Get-AppxProvisionedPackage -Online | Where-Object -Property 'DisplayName' -In -Value @( @@ -212,8 +213,7 @@ Where-Object -Property 'DisplayName' -In -Value @( 'Microsoft.WindowsStore'; ) | Remove-AppxProvisionedPackage -AllUsers -Online *>&1 >> "$env:TEMP\remove-packages.log"; - - + Get-WindowsCapability -Online | Where-Object -FilterScript { @@ -231,17 +231,15 @@ Where-Object -FilterScript { ); } | Remove-WindowsCapability -Online *>&1 >> "$env:TEMP\remove-caps.log"; - - - + + Get-WindowsOptionalFeature -Online | Where-Object -Property 'FeatureName' -In -Value @( 'Microsoft-SnippingTool'; ) | Disable-WindowsOptionalFeature -Online -Remove -NoRestart *>&1 >> "$env:TEMP\remove-features.log"; - - - - + + + :: Bypasses Microsoft Account Creation reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f @@ -419,10 +417,10 @@ reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskC reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "TargetReleaseVersion" /t REG_DWORD /d 1 /f reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "TargetReleaseVersionInfo" /t REG_SZ /d "22H2" /f reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "ProductVersion" /t REG_SZ /d "Windows 10" /f - - - - + + + - - - - + + + :: Disabling the Delivery of Personalized or Suggested Content Like App Suggestions, Tips, and Advertisements in Windows reg.exe add "HKU\DefaultUser\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d 0 /f reg.exe add "HKU\DefaultUser\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d 0 /f @@ -1103,10 +1100,9 @@ reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\ reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\WindowsAI" /f reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\WindowsAI" /v "DisableAIDataAnalysis" /t REG_DWORD /d 1 /f reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\Windows AI" /v "TurnOffSavingSnapshots" /t REG_DWORD /d 1 /f - - - - + + + :: Disabling the Delivery of Personalized or Suggested Content Like App Suggestions, Tips, and Advertisements in Windows reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d 0 /f reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d 0 /f @@ -1358,10 +1354,10 @@ reg.exe add "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Windows AI" / :: Restart PC to Apply All Changes shutdown /r -t 1 - - - - + + + - - - - - - - - - - -]]> - - - - + + + ]]> + + + + - - + +