Windows 11 Setup Script
irm https://raw.githubusercontent.com/ayu2805/wss/main/wss.ps1 | iexNote: If you want to run setup git, run:
irm https://raw.githubusercontent.com/ayu2805/wss/main/git-config.ps1 | iex
To remove all removable packages, run the following PowerShell command:
Get-AppxPackage -AllUsers | Remove-AppxPackage -ErrorAction SilentlyContinueTo remove all removable optional features, execute the command below:
Get-WindowsCapability -Online | Where-Object {$_.State -eq 'Installed'} | ForEach-Object {
try {
Remove-WindowsCapability -Online -Name $_.Name
} catch {
Write-Host "Skipped Permanent Optional Features"
}
}To check and disable all removable Windows features, use the following command:
Get-WindowsOptionalFeature -Online | Where-Object {$_.State -eq 'Enabled'} | ForEach-Object {
try {
Disable-WindowsOptionalFeature -Online -Name $_.Name
} catch {
Write-Host "Skipped Permanent Windows Features"
}
}