Microsoft Account EVIL: Difference between revisions
Created page with "...have that urge to track down the people at Microsoft that have messed up Windows 11, and made it infuriatingly impossible to get rid of sign ins? Curb your anger instead and just solve the problem with the below "Thor's Hammer";<syntaxhighlight lang="text"> # THOR HAMMER: remove Microsoft cloud-account identity caches from all local profiles. # Run as Administrator. Reboot happens at the end. $ErrorActionPreference = "SilentlyContinue" # Kill Microsoft identity/clo..." |
mNo edit summary |
||
| Line 1: | Line 1: | ||
...have that urge to track down the people at Microsoft that have messed up Windows 11, and made it infuriatingly impossible to get rid of sign ins? Curb your anger instead and just solve the problem with the below "Thor's Hammer";<syntaxhighlight lang="text"> | ...have that urge to track down the people at Microsoft that have messed up Windows 11, and made it infuriatingly impossible to get rid of sign ins? Curb your anger instead and just solve the problem with the below "Thor's Hammer";<syntaxhighlight lang="text"> | ||
$ErrorActionPreference = "SilentlyContinue" | $ErrorActionPreference = "SilentlyContinue" | ||
$Procs = @( | $Procs = @( | ||
"OneDrive","msedge","Teams","ms-teams","outlook","olk","winword","excel","powerpnt", | "OneDrive","msedge","Teams","ms-teams","outlook","olk","winword","excel","powerpnt", | ||
| Line 15: | Line 13: | ||
} | } | ||
$Services = @( | $Services = @( | ||
"TokenBroker", | "TokenBroker", | ||
| Line 31: | Line 28: | ||
dsregcmd /leave 2>$null | dsregcmd /leave 2>$null | ||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Force | Out-Null | New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Force | Out-Null | ||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type DWord -Value 1 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type DWord -Value 1 | ||
| Line 44: | Line 40: | ||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "NoConnectedUser" -Type DWord -Value 3 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "NoConnectedUser" -Type DWord -Value 3 | ||
$OneDriveUninstallers = @( | $OneDriveUninstallers = @( | ||
"$env:SystemRoot\System32\OneDriveSetup.exe", | "$env:SystemRoot\System32\OneDriveSetup.exe", | ||
| Line 69: | Line 64: | ||
} | } | ||
$Profiles = Get-ChildItem "C:\Users" -Directory | Where-Object { | $Profiles = Get-ChildItem "C:\Users" -Directory | Where-Object { | ||
$_.Name -notin @("Public","Default","Default User","All Users") | $_.Name -notin @("Public","Default","Default User","All Users") | ||
| Line 98: | Line 92: | ||
} | } | ||
$HiveRoots = Get-ChildItem Registry::HKEY_USERS | Where-Object { | $HiveRoots = Get-ChildItem Registry::HKEY_USERS | Where-Object { | ||
$_.Name -match 'S-1-5-21|\.DEFAULT' | $_.Name -match 'S-1-5-21|\.DEFAULT' | ||
| Line 121: | Line 114: | ||
} | } | ||
foreach ($Profile in $Profiles) { | foreach ($Profile in $Profiles) { | ||
$NtUser = "$($Profile.FullName)\NTUSER.DAT" | $NtUser = "$($Profile.FullName)\NTUSER.DAT" | ||
| Line 150: | Line 142: | ||
} | } | ||
$Packages = @( | $Packages = @( | ||
"Microsoft.OneDriveSync", | "Microsoft.OneDriveSync", | ||