Here are a few customization that can be done on a Windows 10 image.
- Enable PowerShell Remoting
- Configure Remote Desktop
- Enable App-V
- Make IE the Default Browser
- Disable Quick Access: Recent Files
- Disable Quick Access: Frequent Folders
- Change Explorer Home Screen back to This PC
- Set Lock Screen
- Set Wallpaper
- Remove Built-in Apps
- Remove Edge Welcome Screen and Disable Prompt for Default Browser.
- Add “Run as Different User” in Context Menu
- Turn Off “Microsoft Consumer Experience”
- Disable “File Explorer Suggestion”
.
.
1. Enable PowerShell Remoting
PowerShell
# Enable Powershell Remoting Write-Host "Enable Powershell Remoting" Try { Enable-PSRemoting –force Write-Host "Powershell Remoting successfully enabled" } Catch { Write-Host "Exception caught in enabling Powershell Remoting : $error[0]" }
.
.
2. Configure Remote Desktop
PowerShell
# Configure Remote Desktop Write-Host "Configure Remote Desktop" Try { Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" –Value 0 Enable-NetFirewallRule -DisplayGroup "Remote Desktop" Write-Host "Remote Desktop successfully configured" } Catch { Write-Host "Exception caught in configuring Remote Desktop : $error[0]" }
.
.
3. Enable App-V
PowerShell
## Enable App-V Write-Host "Enable App-V" Try { Enable-Appv Write-Host "App-V successfully enabled" } Catch { Write-Host "Exception caught in enabling App-V : $error[0]" }
.
.
4. Make IE the Default Browser
PowerShell
## Make IE the default browser Write-Host "Make IE the default browser using DSIM" Try { Dism /online /import-defaultappassociations:"C:\Temp\IEDefaultBrowser.xml" Write-Host "IE successfully set as default browser" } Catch { Write-Host "Exception caught in making IE the default browser : $error[0]" }
.
Following the content of IEDefaultBrowser.xml:
XML
<?xml version="1.0" encoding="UTF-8"?> <DefaultAssociations> <Association Identifier=".htm" ProgId="IE.AssocFile.HTM" ApplicationName="Internet Explorer" /> <Association Identifier=".html" ProgId="IE.AssocFile.HTM" ApplicationName="Internet Explorer" /> <Association Identifier=".mht" ProgId="IE.AssocFile.MHT" ApplicationName="Internet Explorer" /> <Association Identifier=".mhtml" ProgId="IE.AssocFile.MHT" ApplicationName="Internet Explorer" /> <Association Identifier=".partial" ProgId="IE.AssocFile.PARTIAL" ApplicationName="Internet Explorer" /> <Association Identifier=".svg" ProgId="IE.AssocFile.SVG" ApplicationName="Internet Explorer" /> <Association Identifier=".url" ProgId="IE.AssocFile.URL" ApplicationName="Internet Browser" /> <Association Identifier=".xht" ProgId="IE.AssocFile.XHT" ApplicationName="Internet Explorer" /> <Association Identifier=".xhtml" ProgId="IE.AssocFile.XHT" ApplicationName="Internet Explorer" /> <Association Identifier="ftp" ProgId="IE.FTP" ApplicationName="Internet Explorer" /> <Association Identifier="http" ProgId="IE.HTTP" ApplicationName="Internet Explorer" /> <Association Identifier="https" ProgId="IE.HTTPS" ApplicationName="Internet Explorer" /> <Association Identifier="mk" ProgId="IE.HTTP" ApplicationName="Internet Explorer" /> <Association Identifier="res" ProgId="IE.HTTP" ApplicationName="Internet Explorer" /> </DefaultAssociations>
.
.
5. Disable Quick Access: Recent Files
Using PSADT:
# Disable Quick Access: Recent Files Write-Log "Disable Quick Access: Recent Files" Write-Log "Add HKCU registry for all existing profiles + default user" [scriptblock]$HKCURegistrySettings = { Set-RegistryKey -Key 'HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' -Name 'ShowRecent' -value '0' -Type Dword -SID $UserProfile.SID } Invoke-HKCURegistrySettingsForAllUsers -RegistrySettings $HKCURegistrySettings
.
.
6. Disable Quick Access: Frequent Folders
Using PSADT:
# Disable Quick Access: Frequent Folders Write-Log "Disable Quick Access: Frequent Folders" Write-Log "Add HKCU registry for all existing profiles + default user" [scriptblock]$HKCURegistrySettings = { Set-RegistryKey -Key 'HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' -Name 'ShowFrequent' -value '0' -Type Dword -SID $UserProfile.SID } Invoke-HKCURegistrySettingsForAllUsers -RegistrySettings $HKCURegistrySettings
.
.
7. Change Explorer Home Screen back to This PC
Using PSADT:
# Change Explorer home screen back to This PC Write-Log "Change Explorer home screen back to This PC" Write-Log "Add HKCU registry for all existing profiles + default user" [scriptblock]$HKCURegistrySettings = { Set-RegistryKey -Key 'HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'LaunchTo' -value '1' -Type Dword -SID $UserProfile.SID } Invoke-HKCURegistrySettingsForAllUsers -RegistrySettings $HKCURegistrySettings
.
.
8. Set Lock Screen
PowerShell
# Set Lock Screen Write-Host "Set Lock Screen" Try { Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "LockScreenImage" –Value “C:\\Windows\\Web\\Wallpaper\\MyCompany\\Lockscreen.jpg” Write-Host "Lock Screen successfully configured" } Catch { Write-Host "Exception caught in configuring Lock Screen : $error[0]" }
.
.
9. Set Wallpaper
Using PSADT:
# Set the Corporate Wallpaper Write-Log "Set the Corporate Wallpaper" Write-Log "Add HKCU registry for all existing profiles + default user" [scriptblock]$HKCURegistrySettings = { Set-RegistryKey -Key 'HKCU:Control Panel\Desktop' -Name 'Wallpaper' -value 'C:\Windows\Web\Wallpaper\Corporate\BackgroundDefault.jpg' -Type String -SID $UserProfile.SID } Invoke-HKCURegistrySettingsForAllUsers -RegistrySettings $HKCURegistrySettings
.
.
10. Remove Built-in Apps
The following script allows to uninstall all Built-in Apps except a list of essential Apps
PowerShell
# Get a list of all apps $AppArrayList = Get-AppxPackage -PackageTypeFilter Bundle | Select-Object -Property Name, PackageFullName | Sort-Object -Property Name # Loop through the list of apps foreach ($App in $AppArrayList) { # Exclude essential Windows apps if (($App.Name -in "Microsoft.WindowsCalculator", "Microsoft.Appconnector", "Microsoft.WindowsSoundRecorder", "Microsoft.DesktopAppInstaller", "Microsoft.Messaging")) { Write-Host "Skipping essential Windows app: $($App.Name)" } # Remove AppxPackage and AppxProvisioningPackage else { # Gather package names $AppPackageFullName = Get-AppxPackage -Name $App.Name | Select-Object -ExpandProperty PackageFullName $AppProvisioningPackageName = Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -like $App.Name } | Select-Object -ExpandProperty PackageName # Attempt to remove AppxPackage try { Write-Host "Remove AppxPackage: $($AppPackageFullName)" Remove-AppxPackage -Package $AppPackageFullName -ErrorAction Stop } catch [System.Exception] { Write-Host "Remove AppxPackage: $($AppPackageFullName) FAILED" Write-Host "Exception caught in importing AppxPackage : $_.Exception.Message" } # Attempt to remove AppxProvisioningPackage try { Write-Host "Remove AppxProvisioningPackage: $($AppProvisioningPackageName)" Remove-AppxProvisionedPackage -PackageName $AppProvisioningPackageName -Online -ErrorAction Stop } catch [System.Exception] { Write-Host "Remove AppxProvisioningPackage: $($AppProvisioningPackageName) FAILED" Write-Host "Exception caught in importing AppxProvisioningPackage : $_.Exception.Message" } } }
.
The following script allows to uninstall some Windows Apps:
PowerShell
# Remove Get Office Write-Host "Remove Get Office" try { get-appxpackage *officehub* | remove-appxpackage Write-Host "Success" } catch [System.Exception] { Write-Host "Failure" Write-Host "Exception caught in removing Get Office : $_.Exception.Message" } # Remove Microsoft Solitaire Collection Write-Host "Remove Microsoft Solitaire Collection" try { get-appxpackage *solitaire* | remove-appxpackage Write-Host "Success" } catch [System.Exception] { Write-Host "Failure" Write-Host "Exception caught in removing Microsoft Solitaire Collection : $_.Exception.Message" } # Remove OneDrive Write-Host "Remove OneDrive" Show-InstallationWelcome -CloseApps 'OneDrive' -BlockExecution -Silent Execute-Process -Path 'C:\Windows\SysWOW64\OneDriveSetup.exe' -Parameters '/uninstall' # Remove OneNote Write-Host "Remove OneNote" try { get-appxpackage *onenote* | remove-appxpackage Write-Host "Success" } catch [System.Exception] { Write-Host "Failure" Write-Host "Exception caught in removing OneNote : $_.Exception.Message" } # Remove Skype Preview Write-Host "Remove Skype Preview" try { get-appxpackage *skypeapp* | remove-appxpackage Write-Host "Success" } catch [System.Exception] { Write-Host "Failure" Write-Host "Exception caught in removing Skype Preview : $_.Exception.Message" } # Remove Xbox Write-Host "Remove Xbox" try { Get-AppxPackage *xboxapp* | Remove-AppxPackage Write-Host "Success" } catch [System.Exception] { Write-Host "Failure" Write-Host "Exception caught in removing Xbox (app) : $_.Exception.Message" } try { Get-AppxPackage *xboxspeech* | Remove-AppxPackage Write-Host "Success" } catch [System.Exception] { Write-Host "Failure" Write-Host "Exception caught in removing Xbox (speech) : $_.Exception.Message" }
.
.
11. Configure Edge
Remove Edge Welcome Screen and Disable Prompt for Default Browser.
Using PSADT:
# Remove Edge Welcome Screen and disable the prompt to make it the default browser Write-Log "Remove Edge Welcome Screen and disable the prompt to make it the default browser" Write-Log "Add HKCU registry for all existing profiles + default user" [scriptblock]$HKCURegistrySettings = { Set-RegistryKey -Key 'HKCU:SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\FirstRun' -Name 'LastFirstRunVersionDelivered' -value '1' -Type DWORD -SID $UserProfile.SID Set-RegistryKey -Key 'HKCU:SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Main' -Name 'IE10TourShown' -value '1' -Type DWORD -SID $UserProfile.SID Set-RegistryKey -Key 'HKCU:SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Main' -Name 'DisallowDefaultBrowserPrompt' -value '1' -Type DWORD -SID $UserProfile.SID } Invoke-HKCURegistrySettingsForAllUsers -RegistrySettings $HKCURegistrySettings
.
Using Registry:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\FirstRun] "LastFirstRunVersionDelivered"=dword:00000001 [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Main] "IE10TourShown"=dword:00000001 "DisallowDefaultBrowserPrompt"=dword:00000001
.
.
12. Add “Run as Different User” in Context Menu
Registry
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer] "ShowRunasDifferentuserinStart"=dword:00000001
.
.
13. Turn Off “Microsoft Consumer Experience”
Registry
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent] "DisableWindowsConsumerFeatures"=dword:00000001
.
.
14. Disable “File Explorer Suggestion”
Registry
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] "ShowSyncProviderNotifications"=dword:00000000