| 
						 
							
							
							
						 
					 | 
				
			
			 | 
			 | 
			
				@@ -1,12 +1,13 @@
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				<?xml version="1.0" encoding="utf-8"?>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					<!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=en-US&Locale=en-US&Keyboard=00000409&UseKeyboard2=true&Locale2=it-IT&Keyboard2=00000410&GeoLocation=244&ProcessorArchitecture=amd64&ComputerNameMode=Random&CompactOsMode=Default&TimeZoneMode=Explicit&TimeZone=W.+Europe+Standard+Time&PartitionMode=Interactive&DiskAssertionMode=Skip&WindowsEditionMode=Firmware&InstallFromMode=Automatic&PEMode=Default&UserAccountMode=Unattended&AccountName0=sadmin&AccountDisplayName0=&AccountPassword0=password&AccountGroup0=Administrators&AutoLogonMode=Own&ObscurePasswords=true&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&TaskbarSearch=Hide&TaskbarIconsMode=Empty&DisableWidgets=true&LeftTaskbar=true&HideTaskViewButton=true&DisableBingResults=true&StartTilesMode=Default&StartPinsMode=Empty&DisableFastStartup=true&EnableLongPaths=true&DisableAppSuggestions=true&HideEdgeFre=true&DisableEdgeStartupBoost=true&DeleteWindowsOld=true&EffectsMode=Default&DesktopIconsMode=Default&StartFoldersMode=Default&WifiMode=Skip&ExpressSettings=DisableAll&LockKeysMode=Skip&StickyKeysMode=Default&ColorMode=Default&WallpaperMode=Default&LockScreenMode=Default&Remove3DViewer=true&RemoveBingSearch=true&RemoveCamera=true&RemoveClipchamp=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveWindowsHello=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGameAssist=true&RemoveGetHelp=true&RemoveHandwriting=true&RemoveInternetExplorer=true&RemoveMailCalendar=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveMediaFeatures=true&RemoveMixedReality=true&RemoveZuneVideo=true&RemoveNews=true&RemoveNotepad=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOneSync=true&RemoveOpenSSHClient=true&RemoveOutlook=true&RemovePaint3D=true&RemovePeople=true&RemovePhotos=true&RemovePowerAutomate=true&RemovePowerShell2=true&RemovePowerShellISE=true&RemoveQuickAssist=true&RemoveRecall=true&RemoveSkype=true&RemoveSolitaire=true&RemoveSpeech=true&RemoveStepsRecorder=true&RemoveStickyNotes=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWallet=true&RemoveWeather=true&RemoveFaxAndScan=true&RemoveWindowsMediaPlayer=true&RemoveZuneMusic=true&RemoveWordPad=true&RemoveXboxApps=true&RemoveYourPhone=true&WdacMode=Skip-->
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					<settings pass="offlineServicing"></settings>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					<settings pass="windowsPE">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<UILanguage>en-US</UILanguage>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</component>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<ImageInstall>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								<OSImage>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
									<Compact>false</Compact>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								</OSImage>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							</ImageInstall>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<UserData>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								<ProductKey>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
									<Key>00000-00000-00000-00000-00000</Key>
 | 
			
		
		
	
	
		
			
				
					
					| 
						
					 | 
				
			
			 | 
			 | 
			
				@@ -29,33 +30,12 @@
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
									<Order>2</Order>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
									<Path>powershell.exe -WindowStyle Normal -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\Specialize.ps1' -Raw | Invoke-Expression;"</Path>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								</RunSynchronousCommand>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								<RunSynchronousCommand wcm:action="add">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
									<Order>3</Order>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
									<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								</RunSynchronousCommand>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								<RunSynchronousCommand wcm:action="add">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
									<Order>4</Order>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
									<Path>powershell.exe -WindowStyle Normal -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\DefaultUser.ps1' -Raw | Invoke-Expression;"</Path>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								</RunSynchronousCommand>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								<RunSynchronousCommand wcm:action="add">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
									<Order>5</Order>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
									<Path>reg.exe unload "HKU\DefaultUser"</Path>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								</RunSynchronousCommand>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							</RunSynchronous>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</component>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<TimeZone>W. Europe Standard Time</TimeZone>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</component>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					</settings>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					<settings pass="auditSystem"></settings>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					<settings pass="auditUser"></settings>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					<settings pass="oobeSystem">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<InputLocale>0409:00000409;0410:00000410</InputLocale>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<SystemLocale>en-US</SystemLocale>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<UILanguage>en-US</UILanguage>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<UserLocale>en-US</UserLocale>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</component>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<UserAccounts>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								<LocalAccounts>
 | 
			
		
		
	
	
		
			
				
					
					| 
						
					 | 
				
			
			 | 
			 | 
			
				@@ -111,342 +91,13 @@ foreach( $file in $Document.unattend.Extensions.File ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    [System.IO.File]::WriteAllBytes( $path, $bytes );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</ExtractScript>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<File path="C:\Windows\Setup\Scripts\RemovePackages.ps1">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$selectors = @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Microsoft3DViewer';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.BingSearch';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.WindowsCamera';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Clipchamp.Clipchamp';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Copilot';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.549981C3F5F10';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Windows.DevHome';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'MicrosoftCorporationII.MicrosoftFamily';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.WindowsFeedbackHub';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Edge.GameAssist';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.GetHelp';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Getstarted';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'microsoft.windowscommunicationsapps';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.WindowsMaps';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.MixedReality.Portal';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.BingNews';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.WindowsNotepad';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.MicrosoftOfficeHub';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Office.OneNote';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.OutlookForWindows';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.MSPaint';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.People';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Windows.Photos';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.PowerAutomateDesktop';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'MicrosoftCorporationII.QuickAssist';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.SkypeApp';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.MicrosoftSolitaireCollection';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.MicrosoftStickyNotes';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'MicrosoftTeams';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'MSTeams';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Todos';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.WindowsSoundRecorder';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Wallet';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.BingWeather';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Xbox.TCUI';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.XboxApp';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.XboxGameOverlay';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.XboxGamingOverlay';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.XboxIdentityProvider';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.XboxSpeechToTextOverlay';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.GamingApp';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.YourPhone';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.ZuneMusic';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.ZuneVideo';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$getCommand = {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  Get-AppxProvisionedPackage -Online;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$filterCommand = {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  $_.DisplayName -eq $selector;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$removeCommand = {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  [CmdletBinding()]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  param(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    [Parameter( Mandatory, ValueFromPipeline )]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    $InputObject
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  process {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    $InputObject | Remove-AppxProvisionedPackage -AllUsers -Online -ErrorAction 'Continue';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$type = 'Package';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$logfile = 'C:\Windows\Setup\Scripts\RemovePackages.log';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				& {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					$installed = & $getCommand;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					foreach( $selector in $selectors ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$result = [ordered] @{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							Selector = $selector;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$found = $installed | Where-Object -FilterScript $filterCommand;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						if( $found ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							$result.Output = $found | & $removeCommand;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							if( $? ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								$result.Message = "$type removed.";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							} else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								$result.Message = "$type not removed.";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								$result.Error = $Error[0];
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						} else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							$result.Message = "$type not installed.";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$result | ConvertTo-Json -Depth 3 -Compress;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				} *>&1 >> $logfile;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</File>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<File path="C:\Windows\Setup\Scripts\RemoveCapabilities.ps1">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$selectors = @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Print.Fax.Scan';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Language.Handwriting';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Browser.InternetExplorer';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'MathRecognizer';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'OneCoreUAP.OneSync';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'OpenSSH.Client';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Windows.PowerShell.ISE';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'App.Support.QuickAssist';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Language.Speech';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Language.TextToSpeech';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'App.StepsRecorder';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Hello.Face.18967';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Hello.Face.Migration.18967';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Hello.Face.20134';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Media.WindowsMediaPlayer';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Microsoft.Windows.WordPad';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$getCommand = {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  Get-WindowsCapability -Online | Where-Object -Property 'State' -NotIn -Value @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    'NotPresent';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    'Removed';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$filterCommand = {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  ($_.Name -split '~')[0] -eq $selector;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$removeCommand = {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  [CmdletBinding()]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  param(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    [Parameter( Mandatory, ValueFromPipeline )]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    $InputObject
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  process {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    $InputObject | Remove-WindowsCapability -Online -ErrorAction 'Continue';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$type = 'Capability';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$logfile = 'C:\Windows\Setup\Scripts\RemoveCapabilities.log';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				& {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					$installed = & $getCommand;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					foreach( $selector in $selectors ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$result = [ordered] @{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							Selector = $selector;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$found = $installed | Where-Object -FilterScript $filterCommand;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						if( $found ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							$result.Output = $found | & $removeCommand;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							if( $? ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								$result.Message = "$type removed.";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							} else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								$result.Message = "$type not removed.";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								$result.Error = $Error[0];
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						} else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							$result.Message = "$type not installed.";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$result | ConvertTo-Json -Depth 3 -Compress;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				} *>&1 >> $logfile;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</File>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<File path="C:\Windows\Setup\Scripts\RemoveFeatures.ps1">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$selectors = @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'MediaPlayback';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'MicrosoftWindowsPowerShellV2Root';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					'Recall';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$getCommand = {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  Get-WindowsOptionalFeature -Online | Where-Object -Property 'State' -NotIn -Value @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    'Disabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    'DisabledWithPayloadRemoved';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$filterCommand = {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  $_.FeatureName -eq $selector;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$removeCommand = {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  [CmdletBinding()]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  param(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    [Parameter( Mandatory, ValueFromPipeline )]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    $InputObject
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  process {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    $InputObject | Disable-WindowsOptionalFeature -Online -Remove -NoRestart -ErrorAction 'Continue';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$type = 'Feature';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$logfile = 'C:\Windows\Setup\Scripts\RemoveFeatures.log';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				& {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					$installed = & $getCommand;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					foreach( $selector in $selectors ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$result = [ordered] @{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							Selector = $selector;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$found = $installed | Where-Object -FilterScript $filterCommand;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						if( $found ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							$result.Output = $found | & $removeCommand;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							if( $? ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								$result.Message = "$type removed.";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							} else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								$result.Message = "$type not removed.";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								$result.Error = $Error[0];
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						} else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							$result.Message = "$type not installed.";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$result | ConvertTo-Json -Depth 3 -Compress;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				} *>&1 >> $logfile;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</File>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<File path="C:\Windows\Setup\Scripts\TaskbarLayoutModification.xml">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				<LayoutModificationTemplate xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout" Version="1">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					<CustomTaskbarLayoutCollection PinListPlacement="Replace">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<defaultlayout:TaskbarLayout>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<taskbar:TaskbarPinList>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								<taskbar:DesktopApp DesktopApplicationLinkPath="#leaveempty" />
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							</taskbar:TaskbarPinList>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</defaultlayout:TaskbarLayout>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					</CustomTaskbarLayoutCollection>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				</LayoutModificationTemplate>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</File>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<File path="C:\Windows\Setup\Scripts\UnlockStartLayout.vbs">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				HKU = &H80000003
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Set reg = GetObject("winmgmts://./root/default:StdRegProv")
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Set fso = CreateObject("Scripting.FileSystemObject")
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				If reg.EnumKey(HKU, "", sids) = 0 Then
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					If Not IsNull(sids) Then
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						For Each sid In sids
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							key = sid + "\Software\Policies\Microsoft\Windows\Explorer"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							name = "LockedStartLayout"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							If reg.GetDWORDValue(HKU, key, name, existing) = 0 Then
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
								reg.SetDWORDValue HKU, key, name, 0
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							End If
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Next
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					End If
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				End If
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</File>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<File path="C:\Windows\Setup\Scripts\UnlockStartLayout.xml">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					<Triggers>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<EventTrigger>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<Enabled>true</Enabled>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Application"&gt;&lt;Select Path="Application"&gt;*[System[Provider[@Name='UnattendGenerator'] and EventID=1]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</EventTrigger>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					</Triggers>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					<Principals>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<Principal id="Author">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<UserId>S-1-5-18</UserId>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<RunLevel>LeastPrivilege</RunLevel>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</Principal>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					</Principals>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					<Settings>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<AllowHardTerminate>true</AllowHardTerminate>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<StartWhenAvailable>false</StartWhenAvailable>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<IdleSettings>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<StopOnIdleEnd>true</StopOnIdleEnd>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<RestartOnIdle>false</RestartOnIdle>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</IdleSettings>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<AllowStartOnDemand>true</AllowStartOnDemand>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<Enabled>true</Enabled>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<Hidden>false</Hidden>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<RunOnlyIfIdle>false</RunOnlyIfIdle>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<WakeToRun>false</WakeToRun>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<Priority>7</Priority>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					</Settings>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					<Actions Context="Author">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<Exec>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<Command>C:\Windows\System32\wscript.exe</Command>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							<Arguments>C:\Windows\Setup\Scripts\UnlockStartLayout.vbs</Arguments>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</Exec>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					</Actions>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				</Task>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</File>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<File path="C:\Windows\Setup\Scripts\SetStartPins.ps1">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$json = '{"pinnedList":[]}';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				if( [System.Environment]::OSVersion.Version.Build -lt 20000 ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					return;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$key = 'Registry::HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				New-Item -Path $key -ItemType 'Directory' -ErrorAction 'SilentlyContinue';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Set-ItemProperty -LiteralPath $key -Name 'ConfigureStartPins' -Value $json -Type 'String';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</File>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<File path="C:\Windows\Setup\Scripts\Specialize.ps1">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$scripts = @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Remove-Item -LiteralPath 'Registry::HKLM\Software\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate' -Force -ErrorAction 'SilentlyContinue';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKCR\.txt\ShellNew" /v ItemName /t REG_EXPAND_SZ /d "@C:\Windows\system32\notepad.exe,-470" /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKCR\.txt\ShellNew" /v NullFile /t REG_SZ /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKCR\txtfilelegacy" /v FriendlyTypeName /t REG_EXPAND_SZ /d "@C:\Windows\system32\notepad.exe,-469" /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKCR\txtfilelegacy" /ve /t REG_SZ /d "Text Document" /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Remove-Item -LiteralPath 'C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk', 'C:\Windows\System32\OneDriveSetup.exe', 'C:\Windows\SysWOW64\OneDriveSetup.exe' -ErrorAction 'Continue';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Remove-Item -LiteralPath 'Registry::HKLM\Software\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate' -Force -ErrorAction 'SilentlyContinue';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\RemovePackages.ps1' -Raw | Invoke-Expression;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\RemoveCapabilities.ps1' -Raw | Invoke-Expression;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\RemoveFeatures.ps1' -Raw | Invoke-Expression;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						net.exe accounts /maxpwage:UNLIMITED;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableCloudOptimizedContent" /t REG_DWORD /d 1 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						[System.Diagnostics.EventLog]::CreateEventSource( 'UnattendGenerator', 'Application' );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Register-ScheduledTask -TaskName 'UnlockStartLayout' -Xml $( Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\UnlockStartLayout.xml' -Raw );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 1 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKLM\Software\Policies\Microsoft\Edge" /v HideFirstRunExperience /t REG_DWORD /d 1 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKLM\Software\Policies\Microsoft\Edge\Recommended" /v BackgroundModeEnabled /t REG_DWORD /d 0 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKLM\Software\Policies\Microsoft\Edge\Recommended" /v StartupBoostEnabled /t REG_DWORD /d 0 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\SetStartPins.ps1' -Raw | Invoke-Expression;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v "PreventDeviceEncryption" /t REG_DWORD /d 1 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
	
		
			
				
					
					| 
						
					 | 
				
			
			 | 
			 | 
			
				@@ -471,137 +122,12 @@ $scripts = @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    $complete += $increment;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				} *>&1 >> "C:\Windows\Setup\Scripts\Specialize.log";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</File>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<File path="C:\Windows\Setup\Scripts\UserOnce.ps1">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$scripts = @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Get-AppxPackage -Name 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						[System.Diagnostics.EventLog]::WriteEntry( 'UnattendGenerator', "User '$env:USERNAME' has requested to unlock the Start menu layout.", [System.Diagnostics.EventLogEntryType]::Information, 1 );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Search' -Name 'SearchboxTaskbarMode' -Type 'DWord' -Value 0;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Get-Process -Name 'explorer' -ErrorAction 'SilentlyContinue' | Where-Object -FilterScript {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
							$_.SessionId -eq ( Get-Process -Id $PID ).SessionId;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						} | Stop-Process -Force;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				& {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  [float] $complete = 0;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  [float] $increment = 100 / $scripts.Count;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  foreach( $script in $scripts ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    Write-Progress -Activity 'Running scripts to configure this user account. Do not close this window.' -PercentComplete $complete;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    '*** Will now execute command «{0}».' -f $(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      $str = $script.ToString().Trim() -replace '\s+', ' ';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      $max = 100;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      if( $str.Length -le $max ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        $str;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      } else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        $str.Substring( 0, $max - 1 ) + '…';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    $start = [datetime]::Now;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    & $script;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    "`r`n" * 3;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    $complete += $increment;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				} *>&1 >> "$env:TEMP\UserOnce.log";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</File>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<File path="C:\Windows\Setup\Scripts\DefaultUser.ps1">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$scripts = @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKU\DefaultUser\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore" /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKU\DefaultUser\Software\Microsoft\Notepad" /v ShowStoreBanner /t REG_DWORD /d 0 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Remove-ItemProperty -LiteralPath 'Registry::HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Run' -Name 'OneDriveSetup' -Force -ErrorAction 'Continue';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\GameDVR" /v AppCaptureEnabled /t REG_DWORD /d 0 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\Explorer" /v "StartLayoutFile" /t REG_SZ /d "C:\Windows\Setup\Scripts\TaskbarLayoutModification.xml" /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\Explorer" /v "LockedStartLayout" /t REG_DWORD /d 1 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowTaskViewButton /t REG_DWORD /d 0 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						$names = @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'ContentDeliveryAllowed';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'FeatureManagementEnabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'OEMPreInstalledAppsEnabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'PreInstalledAppsEnabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'PreInstalledAppsEverEnabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SilentInstalledAppsEnabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SoftLandingEnabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SubscribedContentEnabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SubscribedContent-310093Enabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SubscribedContent-338387Enabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SubscribedContent-338388Enabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SubscribedContent-338389Enabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SubscribedContent-338393Enabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SubscribedContent-353694Enabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SubscribedContent-353696Enabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SubscribedContent-353698Enabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'SystemPaneSuggestionsEnabled';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						foreach( $name in $names ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v $name /t REG_DWORD /d 0 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarAl /t REG_DWORD /d 0 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\Explorer" /v DisableSearchBoxSuggestions /t REG_DWORD /d 1 /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v "UnattendedSetup" /t REG_SZ /d "powershell.exe -WindowStyle Normal -NoProfile -Command \""Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\UserOnce.ps1' -Raw | Invoke-Expression;\""" /f;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				& {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  [float] $complete = 0;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  [float] $increment = 100 / $scripts.Count;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  foreach( $script in $scripts ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    Write-Progress -Activity 'Running scripts to modify the default user’’s registry hive. Do not close this window.' -PercentComplete $complete;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    '*** Will now execute command «{0}».' -f $(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      $str = $script.ToString().Trim() -replace '\s+', ' ';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      $max = 100;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      if( $str.Length -le $max ) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        $str;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      } else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        $str.Substring( 0, $max - 1 ) + '…';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    $start = [datetime]::Now;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    & $script;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    "`r`n" * 3;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    $complete += $increment;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				} *>&1 >> "C:\Windows\Setup\Scripts\DefaultUser.log";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						</File>
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						<File path="C:\Windows\Setup\Scripts\FirstLogon.ps1">
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				$scripts = @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Set-ItemProperty -LiteralPath 'Registry::HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name 'AutoLogonCount' -Type 'DWord' -Force -Value 0;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						cmd.exe /c "rmdir C:\Windows.old";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						Remove-Item -LiteralPath @(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
						  'C:\Windows\Panther\unattend.xml';
 | 
			
		
		
	
	
		
			
				
					
					| 
						
					 | 
				
			
			 | 
			 | 
			
				 
 |