This script is a user "initialisation" for fresh Windows installs (after OOBE). It's here to make my life easier with VMs and such.
Items marked *
require the script to be elevated as Administrator
powershell.exe -ExecutionPolicy Bypass -File ".\Tweaks.ps1"
-
Defaults
- Set Windows Terminal as the default console application.
-
Apply the Windows(dark) theme.
Windows is a little particular with the wallpaper; sometimes it needs a reboot or multiple script runs.
-
Taskbar:
- Align to the left.
- Hide the Copilot button.
- Hide Widgets button.
- Hide Search button.
- Select the far corner of the taskbar to show the desktop.
-
Desktop icons:
- Show "This PC" on the desktop.
- Set desktop icons to small
Set the icon layout that I like (small icons & sort by item type).
-
File Explorer:
- Hide recent files from Quick Access.
- Hide frequently used folders from Quick Access.
- Show hidden files.
- Show extensions for known file types.
- Open "This PC" by default.
- Disable 'Show sync provider notifications'
-
Disable fast startup
*
-
Privacy / Annoyances:
*
- Disable Copilot+ Recall.
*
(Elevation for system-wide context). - Disable 'Store my activity history on this device'.
*
(Elevation for system-wide context). - Disable online search suggestions.
- Disable app permission to user advertising ID.
- Disable lock screen "fun facts, tips and tricks" on the lock screen.
- Disable "Get tips and suggestions when using Windows" notifications.
- Disable "Show me suggested content in the Settings app".
- Disable the "Windows welcome experience" after updates.
- Disable "Suggest ways to get the most out of Windows.
- Disable "Tailored experiences".
- Disable "Show recommendations for tips, shortcuts, new apps and more" in the start menu.
- Disable "Let websites show me locally relevant content by accessing my language list".
- Disable "Let Windows improve Start and Search by tracking app launches".
- Disable "Improve ink and typing".
- Disable "Sending optional diagnostic data".
*
- Disable Windows toast suggestions (notifications).
Note: It is not possible to disable optional diagnostic data without admin elevation programmatically even though you can disable it in control panel without. If you can't run this script as admin and want to disable it, you need to do it manually.
- Disable Copilot+ Recall.
-
Set the power plan to High Performance.
-
Enable RDP
*
- Change registry settings to enable RDP.
*
- Enable firewall rules for the associated "Remote Desktop" display group.
*
- Change registry settings to enable RDP.
-
Remove the Microsoft Edge shortcut from the Public Desktop
*
-
Run OneDrive Uninstallers:
*
-
Run the uninstaller within the %localappdata% folder.
-
Run the uninstaller within the %programfiles(x86)% folder with
/uninstall /allusers
*
-
Run the uninstaller within the Windows folders with
/uninstall /allusers
*
Note: Windows will likely install these again.
-
You can use this file to initialise the Windows Sandbox too!
<Configuration>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\Data\Scripts</HostFolder>
<SandboxFolder>C:\Scripts</SandboxFolder>
<ReadOnly>True</ReadOnly>
</MappedFolder>
</MappedFolders>
<LogonCommand>
<Command>powershell.exe -ExecutionPolicy Bypass -File C:\Scripts\Windows-Tweaks\Tweaks.ps1</Command>
</LogonCommand>
</Configuration>
Save this with your relevant <HostFolder>
, <SandboxFolder>
and <Command>
preferences to a .wsb
file (e.g. Sandbox.wsb
) and then double-click the wsb file to launch the Sandbox.