Guest User

Untitled

a guest
Apr 6th, 2018
211
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
  2.  
  3. Remove all xbox stuff for all users...
  4. Get-AppxPackage -name *Xbox* | Remove-AppxPackage
  5.  
  6. # Remove all app store stuff for all users...
  7. Get-AppxPackage -AllUsers | Remove-AppxPackage
  8.  
  9. # This ensures packages wont install on the next newly created user profile...
  10. Get-AppxProvisionedPackage -Online | Remove-AppxProvisionedPackage -Online
  11.  
  12. Write-Host "Press any key to continue ..."
  13.  
  14. $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
RAW Paste Data