Browse Source

Miscellaneous Fixes

pull/148/head
robjarsen 6 years ago
parent
commit
7894c97565
  1. 14
      README.md
  2. 10
      lib/force-mkdir.psm1
  3. 170
      lib/take-own.psm1
  4. 308
      scripts/block-telemetry.ps1
  5. 48
      scripts/disable-services.ps1
  6. 20
      scripts/disable-windows-defender.ps1
  7. 52
      scripts/experimental_unfuckery.ps1
  8. 44
      scripts/fix-privacy-settings.ps1
  9. 18
      scripts/optimize-user-interface.ps1
  10. 180
      scripts/remove-default-apps.ps1
  11. 12
      scripts/remove-onedrive.ps1
  12. 258
      utils/disable-scheduled-tasks.ps1
  13. 2
      utils/enable-god-mode.ps1
  14. 76
      utils/install-basic-software.ps1

14
README.md

@ -4,7 +4,7 @@
Creators Update. Anything may happen, be prepared. I'll look into relevant
changes and recent issues when the update is released / pushed on to everyone.
This project collects Powershell scripts which help to *debloat* Windows 10,
This project collects PowerShell scripts which help to *debloat* Windows 10,
tweak common settings and install basic software components.
I test these scripts on a Windows 10 Professional 64-Bit (English) virtual
@ -49,7 +49,7 @@ Unblock PowerShell scripts and modules within this directory:
1. Install all available updates for your system.
2. Edit the scripts to fit your need.
3. Run the scripts from a PowerShell with administrator priviledges (Explorer
3. Run the scripts from a PowerShell with administrator privileges (Explorer
`Files > Open Windows PowerShell > Open Windows PowerShell as
administrator`)
4. `PS > Restart-Computer`
@ -75,7 +75,7 @@ is Back], but stop using that shit.
### Startmenu Search
After running the scripts, the startmenu search-box may no longer work on newly
created accounts. It seems like there is an issue with account initilization
created accounts. It seems like there is an issue with account initialization
that is triggered when disabling the GeoLocation service. Following workaround
has been discovered by BK from Atlanta:
@ -93,11 +93,11 @@ functional.
If you are deploying images with MDT and running these scripts, the sysprep
step will hang unless `dmwappushserivce` is active.
### XBox Wireless Adapter
### Xbox Wireless Adapter
Apprently running the stock `remove-default-apps` script will cause XBox
Wireless Adapters to stop functioning. I suspenc one should not remove the XBox
App when wanting to use one. But I haven't confirmed this yet, and there is a
Apparently running the stock `remove-default-apps` script will cause Xbox
Wireless Adapters to stop functioning. You shouldn't remove the Xbox
App when you plan to use apps which are depending on it (I haven't confirmed this yet). There anyway is a
workaround to re-enable it afterwards. See
[#78](https://github.com/W4RH4WK/Debloat-Windows-10/issues/78).

10
lib/force-mkdir.psm1

@ -3,9 +3,9 @@
# While `mkdir -force` works fine when dealing with regular folders, it behaves
# strange when using it at registry level. If the target registry key is
# already present, all values within that key are purged.
function force-mkdir($path) {
if (!(Test-Path $path)) {
#Write-Host "-- Creating full path to: " $path -ForegroundColor White -BackgroundColor DarkGreen
New-Item -ItemType Directory -Force -Path $path
}
function force-mkdir ($path) {
if (!(Test-Path $path)) {
#Write-Host "-- Creating full path to: " $path -ForegroundColor White -BackgroundColor DarkGreen
New-Item -ItemType Directory -Force -Path $path
}
}

170
lib/take-own.psm1

@ -1,106 +1,106 @@
function Takeown-Registry($key) {
# TODO does not work for all root keys yet
switch ($key.split('\')[0]) {
"HKEY_CLASSES_ROOT" {
$reg = [Microsoft.Win32.Registry]::ClassesRoot
$key = $key.substring(18)
}
"HKEY_CURRENT_USER" {
$reg = [Microsoft.Win32.Registry]::CurrentUser
$key = $key.substring(18)
}
"HKEY_LOCAL_MACHINE" {
$reg = [Microsoft.Win32.Registry]::LocalMachine
$key = $key.substring(19)
}
}
function Takeown-Registry ($key) {
# TODO does not work for all root keys yet
switch ($key.split('\')[0]) {
"HKEY_CLASSES_ROOT" {
$reg = [Microsoft.Win32.Registry]::ClassesRoot
$key = $key.substring(18)
}
"HKEY_CURRENT_USER" {
$reg = [Microsoft.Win32.Registry]::CurrentUser
$key = $key.substring(18)
}
"HKEY_LOCAL_MACHINE" {
$reg = [Microsoft.Win32.Registry]::LocalMachine
$key = $key.substring(19)
}
}
# get administraor group
$admins = New-Object System.Security.Principal.SecurityIdentifier("S-1-5-32-544")
$admins = $admins.Translate([System.Security.Principal.NTAccount])
# get administraor group
$admins = New-Object System.Security.Principal.SecurityIdentifier ("S-1-5-32-544")
$admins = $admins.Translate([System.Security.Principal.NTAccount])
# set owner
$key = $reg.OpenSubKey($key, "ReadWriteSubTree", "TakeOwnership")
$acl = $key.GetAccessControl()
$acl.SetOwner($admins)
$key.SetAccessControl($acl)
# set owner
$key = $reg.OpenSubKey($key,"ReadWriteSubTree","TakeOwnership")
$acl = $key.GetAccessControl()
$acl.SetOwner($admins)
$key.SetAccessControl($acl)
# set FullControl
$acl = $key.GetAccessControl()
$rule = New-Object System.Security.AccessControl.RegistryAccessRule($admins, "FullControl", "Allow")
$acl.SetAccessRule($rule)
$key.SetAccessControl($acl)
# set FullControl
$acl = $key.GetAccessControl()
$rule = New-Object System.Security.AccessControl.RegistryAccessRule ($admins,"FullControl","Allow")
$acl.SetAccessRule($rule)
$key.SetAccessControl($acl)
}
function Takeown-File($path) {
takeown.exe /A /F $path
$acl = Get-Acl $path
function Takeown-File ($path) {
takeown.exe /A /F $path
$acl = Get-Acl $path
# get administraor group
$admins = New-Object System.Security.Principal.SecurityIdentifier("S-1-5-32-544")
$admins = $admins.Translate([System.Security.Principal.NTAccount])
# get administraor group
$admins = New-Object System.Security.Principal.SecurityIdentifier ("S-1-5-32-544")
$admins = $admins.Translate([System.Security.Principal.NTAccount])
# add NT Authority\SYSTEM
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($admins, "FullControl", "None", "None", "Allow")
$acl.AddAccessRule($rule)
# add NT Authority\SYSTEM
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule ($admins,"FullControl","None","None","Allow")
$acl.AddAccessRule($rule)
Set-Acl -Path $path -AclObject $acl
Set-Acl -Path $path -AclObject $acl
}
function Takeown-Folder($path) {
Takeown-File $path
foreach ($item in Get-ChildItem $path) {
if (Test-Path $item -PathType Container) {
Takeown-Folder $item.FullName
} else {
Takeown-File $item.FullName
}
}
function Takeown-Folder ($path) {
Takeown-File $path
foreach ($item in Get-ChildItem $path) {
if (Test-Path $item -PathType Container) {
Takeown-Folder $item.FullName
} else {
Takeown-File $item.FullName
}
}
}
function Elevate-Privileges {
param($Privilege)
$Definition = @"
using System;
using System.Runtime.InteropServices;
param($Privilege)
$Definition = @"
using System;
using System.Runtime.InteropServices;
public class AdjPriv {
[DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele);
public class AdjPriv {
[DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele);
[DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok);
[DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok);
[DllImport("advapi32.dll", SetLastError = true)]
internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid);
[DllImport("advapi32.dll", SetLastError = true)]
internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid);
[StructLayout(LayoutKind.Sequential, Pack = 1)]
internal struct TokPriv1Luid {
public int Count;
public long Luid;
public int Attr;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
internal struct TokPriv1Luid {
public int Count;
public long Luid;
public int Attr;
}
internal const int SE_PRIVILEGE_ENABLED = 0x00000002;
internal const int TOKEN_QUERY = 0x00000008;
internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020;
internal const int SE_PRIVILEGE_ENABLED = 0x00000002;
internal const int TOKEN_QUERY = 0x00000008;
internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020;
public static bool EnablePrivilege(long processHandle, string privilege) {
bool retVal;
TokPriv1Luid tp;
IntPtr hproc = new IntPtr(processHandle);
IntPtr htok = IntPtr.Zero;
retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);
tp.Count = 1;
tp.Luid = 0;
tp.Attr = SE_PRIVILEGE_ENABLED;
retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);
retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
return retVal;
}
}
public static bool EnablePrivilege(long processHandle, string privilege) {
bool retVal;
TokPriv1Luid tp;
IntPtr hproc = new IntPtr(processHandle);
IntPtr htok = IntPtr.Zero;
retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);
tp.Count = 1;
tp.Luid = 0;
tp.Attr = SE_PRIVILEGE_ENABLED;
retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);
retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
return retVal;
}
}
"@
$ProcessHandle = (Get-Process -id $pid).Handle
$type = Add-Type $definition -PassThru
$type[0]::EnablePrivilege($processHandle, $Privilege)
$ProcessHandle = (Get-Process -Id $pid).Handle
$type = Add-Type $definition -Passthru
$type[0]::EnablePrivilege($processHandle,$Privilege)
}

308
scripts/block-telemetry.ps1

@ -17,168 +17,168 @@ Set-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "All
Write-Output "Adding telemetry domains to hosts file"
$hosts_file = "$env:systemroot\System32\drivers\etc\hosts"
$domains = @(
"184-86-53-99.deploy.static.akamaitechnologies.com"
"a-0001.a-msedge.net"
"a-0002.a-msedge.net"
"a-0003.a-msedge.net"
"a-0004.a-msedge.net"
"a-0005.a-msedge.net"
"a-0006.a-msedge.net"
"a-0007.a-msedge.net"
"a-0008.a-msedge.net"
"a-0009.a-msedge.net"
"a1621.g.akamai.net"
"a1856.g2.akamai.net"
"a1961.g.akamai.net"
#"a248.e.akamai.net" # makes iTunes download button disappear (#43)
"a978.i6g1.akamai.net"
"a.ads1.msn.com"
"a.ads2.msads.net"
"a.ads2.msn.com"
"ac3.msn.com"
"ad.doubleclick.net"
"adnexus.net"
"adnxs.com"
"ads1.msads.net"
"ads1.msn.com"
"ads.msn.com"
"aidps.atdmt.com"
"aka-cdn-ns.adtech.de"
"a-msedge.net"
"any.edge.bing.com"
"a.rad.msn.com"
"az361816.vo.msecnd.net"
"az512334.vo.msecnd.net"
"b.ads1.msn.com"
"b.ads2.msads.net"
"bingads.microsoft.com"
"b.rad.msn.com"
"bs.serving-sys.com"
"c.atdmt.com"
"cdn.atdmt.com"
"cds26.ams9.msecn.net"
"choice.microsoft.com"
"choice.microsoft.com.nsatc.net"
"c.msn.com" # can cause issues with Skype
"compatexchange.cloudapp.net"
"corpext.msitadfs.glbdns2.microsoft.com"
"corp.sts.microsoft.com"
"cs1.wpc.v0cdn.net"
"db3aqu.atdmt.com"
"df.telemetry.microsoft.com"
"diagnostics.support.microsoft.com"
"e2835.dspb.akamaiedge.net"
"e7341.g.akamaiedge.net"
"e7502.ce.akamaiedge.net"
"e8218.ce.akamaiedge.net"
"ec.atdmt.com"
"fe2.update.microsoft.com.akadns.net"
"feedback.microsoft-hohm.com"
"feedback.search.microsoft.com"
"feedback.windows.com"
"flex.msn.com"
"g.msn.com"
"h1.msn.com"
"h2.msn.com"
"hostedocsp.globalsign.com"
"i1.services.social.microsoft.com"
"i1.services.social.microsoft.com.nsatc.net"
"ipv6.msftncsi.com"
"ipv6.msftncsi.com.edgesuite.net"
"lb1.www.ms.akadns.net"
"live.rads.msn.com"
"m.adnxs.com"
"msedge.net"
"msftncsi.com"
"msnbot-65-55-108-23.search.msn.com"
"msntest.serving-sys.com"
"oca.telemetry.microsoft.com"
"oca.telemetry.microsoft.com.nsatc.net"
"onesettings-db5.metron.live.nsatc.net"
"pre.footprintpredict.com"
"preview.msn.com"
"rad.live.com"
"rad.msn.com"
"redir.metaservices.microsoft.com"
"reports.wes.df.telemetry.microsoft.com"
"schemas.microsoft.akadns.net"
"secure.adnxs.com"
"secure.flashtalking.com"
"services.wes.df.telemetry.microsoft.com"
"settings-sandbox.data.microsoft.com"
"settings-win.data.microsoft.com"
"sls.update.microsoft.com.akadns.net"
"sqm.df.telemetry.microsoft.com"
"sqm.telemetry.microsoft.com"
"sqm.telemetry.microsoft.com.nsatc.net"
"ssw.live.com"
"static.2mdn.net"
"statsfe1.ws.microsoft.com"
"statsfe2.update.microsoft.com.akadns.net"
"statsfe2.ws.microsoft.com"
"survey.watson.microsoft.com"
"telecommand.telemetry.microsoft.com"
"telecommand.telemetry.microsoft.com.nsatc.net"
"telemetry.appex.bing.net"
"telemetry.appex.bing.net:443"
"telemetry.microsoft.com"
"telemetry.urs.microsoft.com"
"vortex-bn2.metron.live.com.nsatc.net"
"vortex-cy2.metron.live.com.nsatc.net"
"vortex.data.microsoft.com"
"vortex-sandbox.data.microsoft.com"
"vortex-win.data.microsoft.com"
"cy2.vortex.data.microsoft.com.akadns.net"
"watson.live.com"
"watson.microsoft.com"
"watson.ppe.telemetry.microsoft.com"
"watson.telemetry.microsoft.com"
"watson.telemetry.microsoft.com.nsatc.net"
"wes.df.telemetry.microsoft.com"
"win10.ipv6.microsoft.com"
"www.bingads.microsoft.com"
"www.go.microsoft.akadns.net"
"www.msftncsi.com"
"184-86-53-99.deploy.static.akamaitechnologies.com"
"a-0001.a-msedge.net"
"a-0002.a-msedge.net"
"a-0003.a-msedge.net"
"a-0004.a-msedge.net"
"a-0005.a-msedge.net"
"a-0006.a-msedge.net"
"a-0007.a-msedge.net"
"a-0008.a-msedge.net"
"a-0009.a-msedge.net"
"a1621.g.akamai.net"
"a1856.g2.akamai.net"
"a1961.g.akamai.net"
#"a248.e.akamai.net" # makes iTunes download button disappear (#43)
"a978.i6g1.akamai.net"
"a.ads1.msn.com"
"a.ads2.msads.net"
"a.ads2.msn.com"
"ac3.msn.com"
"ad.doubleclick.net"
"adnexus.net"
"adnxs.com"
"ads1.msads.net"
"ads1.msn.com"
"ads.msn.com"
"aidps.atdmt.com"
"aka-cdn-ns.adtech.de"
"a-msedge.net"
"any.edge.bing.com"
"a.rad.msn.com"
"az361816.vo.msecnd.net"
"az512334.vo.msecnd.net"
"b.ads1.msn.com"
"b.ads2.msads.net"
"bingads.microsoft.com"
"b.rad.msn.com"
"bs.serving-sys.com"
"c.atdmt.com"
"cdn.atdmt.com"
"cds26.ams9.msecn.net"
"choice.microsoft.com"
"choice.microsoft.com.nsatc.net"
"c.msn.com" # can cause issues with Skype
"compatexchange.cloudapp.net"
"corpext.msitadfs.glbdns2.microsoft.com"
"corp.sts.microsoft.com"
"cs1.wpc.v0cdn.net"
"db3aqu.atdmt.com"
"df.telemetry.microsoft.com"
"diagnostics.support.microsoft.com"
"e2835.dspb.akamaiedge.net"
"e7341.g.akamaiedge.net"
"e7502.ce.akamaiedge.net"
"e8218.ce.akamaiedge.net"
"ec.atdmt.com"
"fe2.update.microsoft.com.akadns.net"
"feedback.microsoft-hohm.com"
"feedback.search.microsoft.com"
"feedback.windows.com"
"flex.msn.com"
"g.msn.com"
"h1.msn.com"
"h2.msn.com"
"hostedocsp.globalsign.com"
"i1.services.social.microsoft.com"
"i1.services.social.microsoft.com.nsatc.net"
"ipv6.msftncsi.com"
"ipv6.msftncsi.com.edgesuite.net"
"lb1.www.ms.akadns.net"
"live.rads.msn.com"
"m.adnxs.com"
"msedge.net"
"msftncsi.com"
"msnbot-65-55-108-23.search.msn.com"
"msntest.serving-sys.com"
"oca.telemetry.microsoft.com"
"oca.telemetry.microsoft.com.nsatc.net"
"onesettings-db5.metron.live.nsatc.net"
"pre.footprintpredict.com"
"preview.msn.com"
"rad.live.com"
"rad.msn.com"
"redir.metaservices.microsoft.com"
"reports.wes.df.telemetry.microsoft.com"
"schemas.microsoft.akadns.net"
"secure.adnxs.com"
"secure.flashtalking.com"
"services.wes.df.telemetry.microsoft.com"
"settings-sandbox.data.microsoft.com"
"settings-win.data.microsoft.com"
"sls.update.microsoft.com.akadns.net"
"sqm.df.telemetry.microsoft.com"
"sqm.telemetry.microsoft.com"
"sqm.telemetry.microsoft.com.nsatc.net"
"ssw.live.com"
"static.2mdn.net"
"statsfe1.ws.microsoft.com"
"statsfe2.update.microsoft.com.akadns.net"
"statsfe2.ws.microsoft.com"
"survey.watson.microsoft.com"
"telecommand.telemetry.microsoft.com"
"telecommand.telemetry.microsoft.com.nsatc.net"
"telemetry.appex.bing.net"
"telemetry.appex.bing.net:443"
"telemetry.microsoft.com"
"telemetry.urs.microsoft.com"
"vortex-bn2.metron.live.com.nsatc.net"
"vortex-cy2.metron.live.com.nsatc.net"
"vortex.data.microsoft.com"
"vortex-sandbox.data.microsoft.com"
"vortex-win.data.microsoft.com"
"cy2.vortex.data.microsoft.com.akadns.net"
"watson.live.com"
"watson.microsoft.com"
"watson.ppe.telemetry.microsoft.com"
"watson.telemetry.microsoft.com"
"watson.telemetry.microsoft.com.nsatc.net"
"wes.df.telemetry.microsoft.com"
"win10.ipv6.microsoft.com"
"www.bingads.microsoft.com"
"www.go.microsoft.akadns.net"
"www.msftncsi.com"
# extra
"fe2.update.microsoft.com.akadns.net"
"s0.2mdn.net"
"statsfe2.update.microsoft.com.akadns.net",
"survey.watson.microsoft.com"
"view.atdmt.com"
"watson.microsoft.com",
"watson.ppe.telemetry.microsoft.com"
"watson.telemetry.microsoft.com",
"watson.telemetry.microsoft.com.nsatc.net"
"wes.df.telemetry.microsoft.com"
"ui.skype.com", # can cause issues with Skype
"pricelist.skype.com" # can cause issues with Skype
"apps.skype.com" # can cause issues with Skype
"m.hotmail.com"
"s.gateway.messenger.live.com" # can cause issues with Skype
# extra
"fe2.update.microsoft.com.akadns.net"
"s0.2mdn.net"
"statsfe2.update.microsoft.com.akadns.net",
"survey.watson.microsoft.com"
"view.atdmt.com"
"watson.microsoft.com",
"watson.ppe.telemetry.microsoft.com"
"watson.telemetry.microsoft.com",
"watson.telemetry.microsoft.com.nsatc.net"
"wes.df.telemetry.microsoft.com"
"ui.skype.com", # can cause issues with Skype
"pricelist.skype.com" # can cause issues with Skype
"apps.skype.com" # can cause issues with Skype
"m.hotmail.com"
"s.gateway.messenger.live.com" # can cause issues with Skype
)
Write-Output "" | Out-File -Encoding ASCII -Append $hosts_file
foreach ($domain in $domains) {
if (-Not (Select-String -Path $hosts_file -Pattern $domain)) {
Write-Output "0.0.0.0 $domain" | Out-File -Encoding ASCII -Append $hosts_file
}
if (-not (Select-String -Path $hosts_file -Pattern $domain)) {
Write-Output "0.0.0.0 $domain" | Out-File -Encoding ASCII -Append $hosts_file
}
}
Write-Output "Adding telemetry ips to firewall"
$ips = @(
"134.170.30.202"
"137.116.81.24"
"157.56.106.189"
"184.86.53.99"
"2.22.61.43"
"2.22.61.66"
"204.79.197.200"
"23.218.212.69"
"65.39.117.230"
"65.52.108.33"
"65.55.108.23"
"64.4.54.254"
"134.170.30.202"
"137.116.81.24"
"157.56.106.189"
"184.86.53.99"
"2.22.61.43"
"2.22.61.66"
"204.79.197.200"
"23.218.212.69"
"65.39.117.230"
"65.52.108.33"
"65.55.108.23"
"64.4.54.254"
)
Remove-NetFirewallRule -DisplayName "Block Telemetry IPs" -ErrorAction SilentlyContinue
New-NetFirewallRule -DisplayName "Block Telemetry IPs" -Direction Outbound `
-Action Block -RemoteAddress ([string[]]$ips)
-Action Block -RemoteAddress ([string[]]$ips)

48
scripts/disable-services.ps1

@ -3,32 +3,32 @@
# certain services comment out the corresponding lines below.
$services = @(
"diagnosticshub.standardcollector.service" # Microsoft (R) Diagnostics Hub Standard Collector Service
"DiagTrack" # Diagnostics Tracking Service
"dmwappushservice" # WAP Push Message Routing Service (see known issues)
"HomeGroupListener" # HomeGroup Listener
"HomeGroupProvider" # HomeGroup Provider
"lfsvc" # Geolocation Service
"MapsBroker" # Downloaded Maps Manager
"NetTcpPortSharing" # Net.Tcp Port Sharing Service
"RemoteAccess" # Routing and Remote Access
"RemoteRegistry" # Remote Registry
"SharedAccess" # Internet Connection Sharing (ICS)
"TrkWks" # Distributed Link Tracking Client
"WbioSrvc" # Windows Biometric Service
#"WlanSvc" # WLAN AutoConfig
"WMPNetworkSvc" # Windows Media Player Network Sharing Service
"wscsvc" # Windows Security Center Service
#"WSearch" # Windows Search
"XblAuthManager" # Xbox Live Auth Manager
"XblGameSave" # Xbox Live Game Save Service
"XboxNetApiSvc" # Xbox Live Networking Service
"diagnosticshub.standardcollector.service" # Microsoft (R) Diagnostics Hub Standard Collector Service
"DiagTrack" # Diagnostics Tracking Service
"dmwappushservice" # WAP Push Message Routing Service (see known issues)
"HomeGroupListener" # HomeGroup Listener
"HomeGroupProvider" # HomeGroup Provider
"lfsvc" # Geolocation Service
"MapsBroker" # Downloaded Maps Manager
"NetTcpPortSharing" # Net.Tcp Port Sharing Service
"RemoteAccess" # Routing and Remote Access
"RemoteRegistry" # Remote Registry
"SharedAccess" # Internet Connection Sharing (ICS)
"TrkWks" # Distributed Link Tracking Client
"WbioSrvc" # Windows Biometric Service
#"WlanSvc" # WLAN AutoConfig
"WMPNetworkSvc" # Windows Media Player Network Sharing Service
#"wscsvc" # Windows Security Center Service
#"WSearch" # Windows Search
"XblAuthManager" # Xbox Live Auth Manager
"XblGameSave" # Xbox Live Game Save Service
"XboxNetApiSvc" # Xbox Live Networking Service
# Services which cannot be disabled
#"WdNisSvc"
# Services which cannot be disabled
#"WdNisSvc"
)
foreach ($service in $services) {
Write-Output "Trying to disable $service"
Get-Service -Name $service | Set-Service -StartupType Disabled
Write-Output "Trying to disable $service"
Get-Service -Name $service | Set-Service -StartupType Disabled
}

20
scripts/disable-windows-defender.ps1

@ -10,19 +10,19 @@ Write-Output "Elevating priviledges for this process"
do {} until (Elevate-Privileges SeTakeOwnershipPrivilege)
$tasks = @(
"\Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance"
"\Microsoft\Windows\Windows Defender\Windows Defender Cleanup"
"\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan"
"\Microsoft\Windows\Windows Defender\Windows Defender Verification"
"\Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance"
"\Microsoft\Windows\Windows Defender\Windows Defender Cleanup"
"\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan"
"\Microsoft\Windows\Windows Defender\Windows Defender Verification"
)
foreach ($task in $tasks) {
$parts = $task.split('\')
$name = $parts[-1]
$path = $parts[0..($parts.length-2)] -join '\'
$parts = $task.split('\')
$name = $parts[-1]
$path = $parts[0..($parts.length - 2)] -join '\'
Write-Output "Trying to disable scheduled task $name"
Disable-ScheduledTask -TaskName "$name" -TaskPath "$path"
Write-Output "Trying to disable scheduled task $name"
Disable-ScheduledTask -TaskName "$name" -TaskPath "$path"
}
Write-Output "Disabling Windows Defender via Group Policies"
@ -33,7 +33,7 @@ force-mkdir "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\Real
Set-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\Real-Time Protection" "DisableRealtimeMonitoring" 1
Write-Output "Disabling Windows Defender Services"
Takeown-Registry("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinDefend")
Takeown-Registry ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinDefend")
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\WinDefend" "Start" 4
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\WinDefend" "AutorunsDisabled" 3
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\WdNisSvc" "Start" 4

52
scripts/experimental_unfuckery.ps1

@ -10,38 +10,38 @@ do {} until (Elevate-Privileges SeTakeOwnershipPrivilege)
Write-Output "Force removing system apps"
$needles = @(
#"Anytime"
"BioEnrollment"
#"Browser"
"ContactSupport"
#"Cortana" # This will disable startmenu search.
#"Defender"
"Feedback"
"Flash"
"Gaming"
#"InternetExplorer"
#"Maps"
"OneDrive"
#"Wallet"
#"Xbox" # This will result in a bootloop since upgrade 1511
#"Anytime"
"BioEnrollment"
#"Browser"
"ContactSupport"
#"Cortana" # This will disable startmenu search.
#"Defender"
"Feedback"
"Flash"
"Gaming"
#"InternetExplorer"
#"Maps"
"OneDrive"
#"Wallet"
#"Xbox" # This will result in a bootloop since upgrade 1511
)
foreach ($needle in $needles) {
Write-Output "Trying to remove all packages containing $needle"
Write-Output "Trying to remove all packages containing $needle"
$pkgs = (Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" |
Where-Object Name -Like "*$needle*")
$pkgs = (Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" |
Where-Object Name -Like "*$needle*")
foreach ($pkg in $pkgs) {
$pkgname = $pkg.Name.split('\')[-1]
foreach ($pkg in $pkgs) {
$pkgname = $pkg.Name.split('\')[-1]
Takeown-Registry($pkg.Name)
Takeown-Registry($pkg.Name + "\Owners")
Takeown-Registry ($pkg.Name)
Takeown-Registry ($pkg.Name + "\Owners")
Set-ItemProperty -Path ("HKLM:" + $pkg.Name.Substring(18)) -Name Visibility -Value 1
New-ItemProperty -Path ("HKLM:" + $pkg.Name.Substring(18)) -Name DefVis -PropertyType DWord -Value 2
Remove-Item -Path ("HKLM:" + $pkg.Name.Substring(18) + "\Owners")
Set-ItemProperty -Path ("HKLM:" + $pkg.Name.substring(18)) -Name Visibility -Value 1
New-ItemProperty -Path ("HKLM:" + $pkg.Name.substring(18)) -Name DefVis -PropertyType DWord -Value 2
Remove-Item -Path ("HKLM:" + $pkg.Name.substring(18) + "\Owners")
dism.exe /Online /Remove-Package /PackageName:$pkgname /NoRestart
}
dism.exe /Online /Remove-Package /PackageName:$pkgname /NoRestart
}
}

44
scripts/fix-privacy-settings.ps1

@ -26,20 +26,20 @@ Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync" "
Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync" "DeviceMetadataUploaded" 0
Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync" "PriorLogons" 1
$groups = @(
"Accessibility"
"AppSync"
"BrowserSettings"
"Credentials"
"DesktopTheme"
"Language"
"PackageState"
"Personalization"
"StartLayout"
"Windows"
"Accessibility"
"AppSync"
"BrowserSettings"
"Credentials"
"DesktopTheme"
"Language"
"PackageState"
"Personalization"
"StartLayout"
"Windows"
)
foreach ($group in $groups) {
force-mkdir "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\$group"
Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\$group" "Enabled" 0
force-mkdir "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\$group"
Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\$group" "Enabled" 0
}
Write-Output "Set privacy policy accepted state to 0"
@ -67,7 +67,7 @@ Set-ItemProperty "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windo
Write-Output "Disable background access of default apps"
foreach ($key in (Get-ChildItem "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications")) {
Set-ItemProperty ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\" + $key.PSChildName) "Disabled" 1
Set-ItemProperty ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\" + $key.PSChildName) "Disabled" 1
}
Write-Output "Denying device access"
@ -75,12 +75,12 @@ Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\G
Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\LooselyCoupled" "Value" "Deny"
Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\LooselyCoupled" "InitialAppValue" "Unspecified"
foreach ($key in (Get-ChildItem "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global")) {
if ($key.PSChildName -EQ "LooselyCoupled") {
continue
}
Set-ItemProperty ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\" + $key.PSChildName) "Type" "InterfaceClass"
Set-ItemProperty ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\" + $key.PSChildName) "Value" "Deny"
Set-ItemProperty ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\" + $key.PSChildName) "InitialAppValue" "Unspecified"
if ($key.PSChildName -eq "LooselyCoupled") {
continue
}
Set-ItemProperty ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\" + $key.PSChildName) "Type" "InterfaceClass"
Set-ItemProperty ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\" + $key.PSChildName) "Value" "Deny"
Set-ItemProperty ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\" + $key.PSChildName) "InitialAppValue" "Unspecified"
}
Write-Output "Disable location sensor"
@ -88,12 +88,12 @@ force-mkdir "HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Permissio
Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Permissions\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" "SensorPermissionState" 0
Write-Output "Disable submission of Windows Defender findings (w/ elevated privileges)"
Takeown-Registry("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Spynet")
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows Defender\Spynet" "SpyNetReporting" 0 # write-protected even after takeown ?!
Takeown-Registry ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Spynet")
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows Defender\Spynet" "SpyNetReporting" 0 # write-protected even after takeown ?!
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows Defender\Spynet" "SubmitSamplesConsent" 0
Write-Output "Do not share wifi networks"
$user = New-Object System.Security.Principal.NTAccount($env:UserName)
$user = New-Object System.Security.Principal.NTAccount ($env:UserName)
$sid = $user.Translate([System.Security.Principal.SecurityIdentifier]).value
force-mkdir ("HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\" + $sid)
Set-ItemProperty ("HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\" + $sid) "FeatureStates" 0x33c

18
scripts/optimize-user-interface.ps1

@ -14,18 +14,18 @@ Set-ItemProperty "HKCU:\Control Panel\Mouse" "MouseSensitivity" "10"
Set-ItemProperty "HKCU:\Control Panel\Mouse" "MouseSpeed" "0"
Set-ItemProperty "HKCU:\Control Panel\Mouse" "MouseThreshold1" "0"
Set-ItemProperty "HKCU:\Control Panel\Mouse" "MouseThreshold2" "0"
Set-ItemProperty "HKCU:\Control Panel\Mouse" "SmoothMouseXCurve" ([byte[]](0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xCC, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x99, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x26, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00))
Set-ItemProperty "HKCU:\Control Panel\Mouse" "SmoothMouseYCurve" ([byte[]](0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00))
Set-ItemProperty "HKCU:\Control Panel\Mouse" "SmoothMouseXCurve" ([byte[]](0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0xCC,0x0C,0x00,0x00,0x00,0x00,0x00,
0x80,0x99,0x19,0x00,0x00,0x00,0x00,0x00,0x40,0x66,0x26,0x00,0x00,
0x00,0x00,0x00,0x00,0x33,0x33,0x00,0x00,0x00,0x00,0x00))
Set-ItemProperty "HKCU:\Control Panel\Mouse" "SmoothMouseYCurve" ([byte[]](0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA8,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x00,0x00))
Write-Output "Disable mouse pointer hiding"
Set-ItemProperty "HKCU:\Control Panel\Desktop" "UserPreferencesMask" ([byte[]](0x9e,
0x1e, 0x06, 0x80, 0x12, 0x00, 0x00, 0x00))
0x1e,0x06,0x80,0x12,0x00,0x00,0x00))
Write-Output "Disable Game DVR and Game Bar"
force-mkdir "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR"

180
scripts/remove-default-apps.ps1

@ -10,106 +10,106 @@ do {} until (Elevate-Privileges SeTakeOwnershipPrivilege)
Write-Output "Uninstalling default apps"
$apps = @(
# default Windows 10 apps
"Microsoft.3DBuilder"
"Microsoft.Appconnector"
"Microsoft.BingFinance"
"Microsoft.BingNews"
"Microsoft.BingSports"
"Microsoft.BingWeather"
#"Microsoft.FreshPaint"
"Microsoft.Getstarted"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.MicrosoftSolitaireCollection"
#"Microsoft.MicrosoftStickyNotes"
"Microsoft.Office.OneNote"
#"Microsoft.OneConnect"
"Microsoft.People"
"Microsoft.SkypeApp"
#"Microsoft.Windows.Photos"
"Microsoft.WindowsAlarms"
#"Microsoft.WindowsCalculator"
"Microsoft.WindowsCamera"
"Microsoft.WindowsMaps"
"Microsoft.WindowsPhone"
"Microsoft.WindowsSoundRecorder"
#"Microsoft.WindowsStore"
"Microsoft.XboxApp"
"Microsoft.ZuneMusic"
"Microsoft.ZuneVideo"
"microsoft.windowscommunicationsapps"
"Microsoft.MinecraftUWP"
"Microsoft.MicrosoftPowerBIForWindows"
"Microsoft.NetworkSpeedTest"
# Threshold 2 apps
"Microsoft.CommsPhone"
"Microsoft.ConnectivityStore"
"Microsoft.Messaging"
"Microsoft.Office.Sway"
"Microsoft.OneConnect"
"Microsoft.WindowsFeedbackHub"
# default Windows 10 apps
"Microsoft.3DBuilder"
"Microsoft.Appconnector"
"Microsoft.BingFinance"
"Microsoft.BingNews"
"Microsoft.BingSports"
"Microsoft.BingWeather"
#"Microsoft.FreshPaint"
"Microsoft.Getstarted"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.MicrosoftSolitaireCollection"
#"Microsoft.MicrosoftStickyNotes"
"Microsoft.Office.OneNote"
#"Microsoft.OneConnect"
"Microsoft.People"
"Microsoft.SkypeApp"
#"Microsoft.Windows.Photos"
"Microsoft.WindowsAlarms"
#"Microsoft.WindowsCalculator"
"Microsoft.WindowsCamera"
"Microsoft.WindowsMaps"
"Microsoft.WindowsPhone"
"Microsoft.WindowsSoundRecorder"
#"Microsoft.WindowsStore"
"Microsoft.XboxApp"
"Microsoft.ZuneMusic"
"Microsoft.ZuneVideo"
"microsoft.windowscommunicationsapps"
"Microsoft.MinecraftUWP"
"Microsoft.MicrosoftPowerBIForWindows"
"Microsoft.NetworkSpeedTest"
# Threshold 2 apps
"Microsoft.CommsPhone"
"Microsoft.ConnectivityStore"
"Microsoft.Messaging"
"Microsoft.Office.Sway"
"Microsoft.OneConnect"
"Microsoft.WindowsFeedbackHub"
#Redstone apps
"Microsoft.BingFoodAndDrink"
"Microsoft.BingTravel"
"Microsoft.BingHealthAndFitness"
"Microsoft.WindowsReadingList"
# non-Microsoft
"9E2F88E3.Twitter"
"PandoraMediaInc.29680B314EFC2"
"Flipboard.Flipboard"
"ShazamEntertainmentLtd.Shazam"
"king.com.CandyCrushSaga"
"king.com.CandyCrushSodaSaga"
"king.com.*"
"ClearChannelRadioDigital.iHeartRadio"
"4DF9E0F8.Netflix"
"6Wunderkinder.Wunderlist"
"Drawboard.DrawboardPDF"
"2FE3CB00.PicsArt-PhotoStudio"
"D52A8D61.FarmVille2CountryEscape"
"TuneIn.TuneInRadio"
"GAMELOFTSA.Asphalt8Airborne"
#"TheNewYorkTimes.NYTCrossword"
"DB6EA5DB.CyberLinkMediaSuiteEssentials"
"Facebook.Facebook"
"flaregamesGmbH.RoyalRevolt2"
"Playtika.CaesarsSlotsFreeCasino"
"A278AB0D.MarchofEmpires"
"KeeperSecurityInc.Keeper"
"ThumbmunkeysLtd.PhototasticCollage"
"XINGAG.XING"
"89006A2E.AutodeskSketchBook"
"D5EA27B7.Duolingo-LearnLanguagesforFree"
"46928bounde.EclipseManager"
"ActiproSoftwareLLC.562882FEEB491" # next one is for the Code Writer from Actipro Software LLC
"DolbyLaboratories.DolbyAccess"
"SpotifyAB.SpotifyMusic"
"A278AB0D.DisneyMagicKingdoms"
"WinZipComputing.WinZipUniversal"
#Redstone apps
"Microsoft.BingFoodAndDrink"
"Microsoft.BingTravel"
"Microsoft.BingHealthAndFitness"
"Microsoft.WindowsReadingList"
# non-Microsoft
"9E2F88E3.Twitter"
"PandoraMediaInc.29680B314EFC2"
"Flipboard.Flipboard"
"ShazamEntertainmentLtd.Shazam"
"king.com.CandyCrushSaga"
"king.com.CandyCrushSodaSaga"
"king.com.*"
"ClearChannelRadioDigital.iHeartRadio"
"4DF9E0F8.Netflix"
"6Wunderkinder.Wunderlist"
"Drawboard.DrawboardPDF"
"2FE3CB00.PicsArt-PhotoStudio"
"D52A8D61.FarmVille2CountryEscape"
"TuneIn.TuneInRadio"
"GAMELOFTSA.Asphalt8Airborne"
#"TheNewYorkTimes.NYTCrossword"
"DB6EA5DB.CyberLinkMediaSuiteEssentials"
"Facebook.Facebook"
"flaregamesGmbH.RoyalRevolt2"
"Playtika.CaesarsSlotsFreeCasino"
"A278AB0D.MarchofEmpires"
"KeeperSecurityInc.Keeper"
"ThumbmunkeysLtd.PhototasticCollage"
"XINGAG.XING"
"89006A2E.AutodeskSketchBook"
"D5EA27B7.Duolingo-LearnLanguagesforFree"
"46928bounde.EclipseManager"
"ActiproSoftwareLLC.562882FEEB491" # next one is for the Code Writer from Actipro Software LLC
"DolbyLaboratories.DolbyAccess"
"SpotifyAB.SpotifyMusic"
"A278AB0D.DisneyMagicKingdoms"
"WinZipComputing.WinZipUniversal"
# apps which cannot be removed using Remove-AppxPackage
#"Microsoft.BioEnrollment"
#"Microsoft.MicrosoftEdge"
#"Microsoft.Windows.Cortana"
#"Microsoft.WindowsFeedback"
#"Microsoft.XboxGameCallableUI"
#"Microsoft.XboxIdentityProvider"
#"Windows.ContactSupport"
# apps which cannot be removed using Remove-AppxPackage
#"Microsoft.BioEnrollment"
#"Microsoft.MicrosoftEdge"
#"Microsoft.Windows.Cortana"
#"Microsoft.WindowsFeedback"
#"Microsoft.XboxGameCallableUI"
#"Microsoft.XboxIdentityProvider"
#"Windows.ContactSupport"
)
foreach ($app in $apps) {
Write-Output "Trying to remove $app"
Write-Output "Trying to remove $app"
Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -AllUsers
Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -AllUsers
Get-AppXProvisionedPackage -Online |
Where-Object DisplayName -EQ $app |
Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online |
Where-Object DisplayName -EQ $app |
Remove-AppxProvisionedPackage -Online
}
# Prevents "Suggested Applications" returning

12
scripts/remove-onedrive.ps1

@ -10,10 +10,10 @@ taskkill.exe /F /IM "explorer.exe"
Write-Output "Remove OneDrive"
if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") {
& "$env:systemroot\System32\OneDriveSetup.exe" /uninstall
& "$env:systemroot\System32\OneDriveSetup.exe" /uninstall
}
if (Test-Path "$env:systemroot\SysWOW64\OneDriveSetup.exe") {
& "$env:systemroot\SysWOW64\OneDriveSetup.exe" /uninstall
& "$env:systemroot\SysWOW64\OneDriveSetup.exe" /uninstall
}
Write-Output "Removing OneDrive leftovers"
@ -21,8 +21,8 @@ Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:localappdata\Mic
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:programdata\Microsoft OneDrive"
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:systemdrive\OneDriveTemp"
# check if directory is empty before removing:
If ((Get-ChildItem "$env:userprofile\OneDrive" -Recurse | Measure-Object).Count -eq 0) {
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:userprofile\OneDrive"
if ((Get-ChildItem "$env:userprofile\OneDrive" -Recurse | Measure-Object).Count -eq 0) {
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:userprofile\OneDrive"
}
Write-Output "Disable OneDrive via Group Policies"
@ -57,6 +57,6 @@ Start-Sleep 10
Write-Output "Removing additional OneDrive leftovers"
foreach ($item in (Get-ChildItem "$env:WinDir\WinSxS\*onedrive*")) {
Takeown-Folder $item.FullName
Remove-Item -Recurse -Force $item.FullName
Takeown-Folder $item.FullName
Remove-Item -Recurse -Force $item.FullName
}

258
utils/disable-scheduled-tasks.ps1

@ -2,206 +2,206 @@
# This script will disable certain scheduled tasks. Work in progress!
$tasks = @(
# Windows base scheduled tasks
"\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319"
"\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64"
"\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64 Critical"
"\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 Critical"
# Windows base scheduled tasks
"\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319"
"\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64"
"\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64 Critical"
"\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 Critical"
#"\Microsoft\Windows\Active Directory Rights Management Services Client\AD RMS Rights Policy Template Management (Automated)"
#"\Microsoft\Windows\Active Directory Rights Management Services Client\AD RMS Rights Policy Template Management (Manual)"
#"\Microsoft\Windows\Active Directory Rights Management Services Client\AD RMS Rights Policy Template Management (Automated)"
#"\Microsoft\Windows\Active Directory Rights Management Services Client\AD RMS Rights Policy Template Management (Manual)"
#"\Microsoft\Windows\AppID\EDP Policy Manager"
#"\Microsoft\Windows\AppID\PolicyConverter"
"\Microsoft\Windows\AppID\SmartScreenSpecific"
#"\Microsoft\Windows\AppID\VerifiedPublisherCertStoreCheck"
#"\Microsoft\Windows\AppID\EDP Policy Manager"
#"\Microsoft\Windows\AppID\PolicyConverter"
"\Microsoft\Windows\AppID\SmartScreenSpecific"
#"\Microsoft\Windows\AppID\VerifiedPublisherCertStoreCheck"
"\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser"
"\Microsoft\Windows\Application Experience\ProgramDataUpdater"
#"\Microsoft\Windows\Application Experience\StartupAppTask"
"\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser"
"\Microsoft\Windows\Application Experience\ProgramDataUpdater"
#"\Microsoft\Windows\Application Experience\StartupAppTask"
#"\Microsoft\Windows\ApplicationData\CleanupTemporaryState"
#"\Microsoft\Windows\ApplicationData\DsSvcCleanup"
#"\Microsoft\Windows\ApplicationData\CleanupTemporaryState"
#"\Microsoft\Windows\ApplicationData\DsSvcCleanup"
#"\Microsoft\Windows\AppxDeploymentClient\Pre-staged app cleanup"
#"\Microsoft\Windows\AppxDeploymentClient\Pre-staged app cleanup"
"\Microsoft\Windows\Autochk\Proxy"
"\Microsoft\Windows\Autochk\Proxy"
#"\Microsoft\Windows\Bluetooth\UninstallDeviceTask"
#"\Microsoft\Windows\Bluetooth\UninstallDeviceTask"
#"\Microsoft\Windows\CertificateServicesClient\AikCertEnrollTask"
#"\Microsoft\Windows\CertificateServicesClient\KeyPreGenTask"
#"\Microsoft\Windows\CertificateServicesClient\SystemTask"
#"\Microsoft\Windows\CertificateServicesClient\UserTask"
#"\Microsoft\Windows\CertificateServicesClient\UserTask-Roam"
#"\Microsoft\Windows\CertificateServicesClient\AikCertEnrollTask"
#"\Microsoft\Windows\CertificateServicesClient\KeyPreGenTask"
#"\Microsoft\Windows\CertificateServicesClient\SystemTask"
#"\Microsoft\Windows\CertificateServicesClient\UserTask"
#"\Microsoft\Windows\CertificateServicesClient\UserTask-Roam"
#"\Microsoft\Windows\Chkdsk\ProactiveScan"
#"\Microsoft\Windows\Chkdsk\ProactiveScan"
#"\Microsoft\Windows\Clip\License Validation"
#"\Microsoft\Windows\Clip\License Validation"
"\Microsoft\Windows\CloudExperienceHost\CreateObjectTask"
"\Microsoft\Windows\CloudExperienceHost\CreateObjectTask"
"\Microsoft\Windows\Customer Experience Improvement Program\Consolidator"
"\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask"
"\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip"
"\Microsoft\Windows\Customer Experience Improvement Program\Consolidator"
"\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask"
"\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip"
#"\Microsoft\Windows\Data Integrity Scan\Data Integrity Scan"
#"\Microsoft\Windows\Data Integrity Scan\Data Integrity Scan for Crash Recovery"
#"\Microsoft\Windows\Data Integrity Scan\Data Integrity Scan"
#"\Microsoft\Windows\Data Integrity Scan\Data Integrity Scan for Crash Recovery"
#"\Microsoft\Windows\Defrag\ScheduledDefrag"
#"\Microsoft\Windows\Defrag\ScheduledDefrag"
#"\Microsoft\Windows\Diagnosis\Scheduled"
#"\Microsoft\Windows\Diagnosis\Scheduled"
#"\Microsoft\Windows\DiskCleanup\SilentCleanup"
#"\Microsoft\Windows\DiskCleanup\SilentCleanup"
"\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector"
#"\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticResolver"
"\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector"
#"\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticResolver"
#"\Microsoft\Windows\DiskFootprint\Diagnostics"
#"\Microsoft\Windows\DiskFootprint\Diagnostics"
"\Microsoft\Windows\Feedback\Siuf\DmClient"
"\Microsoft\Windows\Feedback\Siuf\DmClient"
#"\Microsoft\Windows\File Classification Infrastructure\Property Definition Sync"
#"\Microsoft\Windows\File Classification Infrastructure\Property Definition Sync"
#"\Microsoft\Windows\FileHistory\File History (maintenance mode)"
#"\Microsoft\Windows\FileHistory\File History (maintenance mode)"
#"\Microsoft\Windows\LanguageComponentsInstaller\Installation"
#"\Microsoft\Windows\LanguageComponentsInstaller\Uninstallation"
#"\Microsoft\Windows\LanguageComponentsInstaller\Installation"
#"\Microsoft\Windows\LanguageComponentsInstaller\Uninstallation"
#"\Microsoft\Windows\Location\Notifications"
#"\Microsoft\Windows\Location\WindowsActionDialog"
#"\Microsoft\Windows\Location\Notifications"
#"\Microsoft\Windows\Location\WindowsActionDialog"
#"\Microsoft\Windows\Maintenance\WinSAT"
#"\Microsoft\Windows\Maintenance\WinSAT"
#"\Microsoft\Windows\Maps\MapsToastTask"
#"\Microsoft\Windows\Maps\MapsUpdateTask"
#"\Microsoft\Windows\Maps\MapsToastTask"
#"\Microsoft\Windows\Maps\MapsUpdateTask"
#"\Microsoft\Windows\MemoryDiagnostic\ProcessMemoryDiagnosticEvents"
#"\Microsoft\Windows\MemoryDiagnostic\RunFullMemoryDiagnostic"
#"\Microsoft\Windows\MemoryDiagnostic\ProcessMemoryDiagnosticEvents"
#"\Microsoft\Windows\MemoryDiagnostic\RunFullMemoryDiagnostic"
"\Microsoft\Windows\Mobile Broadband Accounts\MNO Metadata Parser"
"\Microsoft\Windows\Mobile Broadband Accounts\MNO Metadata Parser"
#"\Microsoft\Windows\MUI\LPRemove"
#"\Microsoft\Windows\MUI\LPRemove"
#"\Microsoft\Windows\Multimedia\SystemSoundsService"
#"\Microsoft\Windows\Multimedia\SystemSoundsService"
#"\Microsoft\Windows\NetCfg\BindingWorkItemQueueHandler"
#"\Microsoft\Windows\NetCfg\BindingWorkItemQueueHandler"
#"\Microsoft\Windows\NetTrace\GatherNetworkInfo"
#"\Microsoft\Windows\NetTrace\GatherNetworkInfo"
#"\Microsoft\Windows\Offline Files\Background Synchronization"
#"\Microsoft\Windows\Offline Files\Logon Synchronization"
#"\Microsoft\Windows\Offline Files\Background Synchronization"
#"\Microsoft\Windows\Offline Files\Logon Synchronization"
#"\Microsoft\Windows\PI\Secure-Boot-Update"
#"\Microsoft\Windows\PI\Sqm-Tasks"
#"\Microsoft\Windows\PI\Secure-Boot-Update"
#"\Microsoft\Windows\PI\Sqm-Tasks"
#"\Microsoft\Windows\Plug and Play\Device Install Group Policy"
#"\Microsoft\Windows\Plug and Play\Device Install Reboot Required"
#"\Microsoft\Windows\Plug and Play\Plug and Play Cleanup"
#"\Microsoft\Windows\Plug and Play\Sysprep Generalize Drivers"
#"\Microsoft\Windows\Plug and Play\Device Install Group Policy"
#"\Microsoft\Windows\Plug and Play\Device Install Reboot Required"
#"\Microsoft\Windows\Plug and Play\Plug and Play Cleanup"
#"\Microsoft\Windows\Plug and Play\Sysprep Generalize Drivers"
#"\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem"
#"\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem"
#"\Microsoft\Windows\Ras\MobilityManager"
#"\Microsoft\Windows\Ras\MobilityManager"
#"\Microsoft\Windows\RecoveryEnvironment\VerifyWinRE"
#"\Microsoft\Windows\RecoveryEnvironment\VerifyWinRE"
#"\Microsoft\Windows\Registry\RegIdleBackup"
#"\Microsoft\Windows\Registry\RegIdleBackup"
#"\Microsoft\Windows\RemoteAssistance\RemoteAssistanceTask"
#"\Microsoft\Windows\RemoteAssistance\RemoteAssistanceTask"
#"\Microsoft\Windows\RemovalTools\MRT_HB"
#"\Microsoft\Windows\RemovalTools\MRT_HB"
#"\Microsoft\Windows\Servicing\StartComponentCleanup"
#"\Microsoft\Windows\Servicing\StartComponentCleanup"
#"\Microsoft\Windows\SettingSync\NetworkStateChangeTask"
#"\Microsoft\Windows\SettingSync\NetworkStateChangeTask"
#"\Microsoft\Windows\Shell\CreateObjectTask"
#"\Microsoft\Windows\Shell\FamilySafetyMonitor"
#"\Microsoft\Windows\Shell\FamilySafetyRefresh"
#"\Microsoft\Windows\Shell\IndexerAutomaticMaintenance"
#"\Microsoft\Windows\Shell\CreateObjectTask"
#"\Microsoft\Windows\Shell\FamilySafetyMonitor"
#"\Microsoft\Windows\Shell\FamilySafetyRefresh"
#"\Microsoft\Windows\Shell\IndexerAutomaticMaintenance"
#"\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask"
#"\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTaskLogon"
#"\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTaskNetwork"
#"\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask"
#"\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTaskLogon"
#"\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTaskNetwork"
#"\Microsoft\Windows\SpacePort\SpaceAgentTask"
#"\Microsoft\Windows\SpacePort\SpaceAgentTask"
#"\Microsoft\Windows\Sysmain\HybridDriveCachePrepopulate"
#"\Microsoft\Windows\Sysmain\HybridDriveCacheRebalance"
#"\Microsoft\Windows\Sysmain\ResPriStaticDbSync"
#"\Microsoft\Windows\Sysmain\WsSwapAssessmentTask"
#"\Microsoft\Windows\Sysmain\HybridDriveCachePrepopulate"
#"\Microsoft\Windows\Sysmain\HybridDriveCacheRebalance"
#"\Microsoft\Windows\Sysmain\ResPriStaticDbSync"
#"\Microsoft\Windows\Sysmain\WsSwapAssessmentTask"
#"\Microsoft\Windows\SystemRestore\SR"
#"\Microsoft\Windows\SystemRestore\SR"
#"\Microsoft\Windows\Task Manager\Interactive"
#"\Microsoft\Windows\Task Manager\Interactive"
#"\Microsoft\Windows\TextServicesFramework\MsCtfMonitor"
#"\Microsoft\Windows\TextServicesFramework\MsCtfMonitor"
#"\Microsoft\Windows\Time Synchronization\ForceSynchronizeTime"
#"\Microsoft\Windows\Time Synchronization\SynchronizeTime"
#"\Microsoft\Windows\Time Synchronization\ForceSynchronizeTime"
#"\Microsoft\Windows\Time Synchronization\SynchronizeTime"
#"\Microsoft\Windows\Time Zone\SynchronizeTimeZone"
#"\Microsoft\Windows\Time Zone\SynchronizeTimeZone"
#"\Microsoft\Windows\TPM\Tpm-HASCertRetr"
#"\Microsoft\Windows\TPM\Tpm-Maintenance"
#"\Microsoft\Windows\TPM\Tpm-HASCertRetr"
#"\Microsoft\Windows\TPM\Tpm-Maintenance"
#"\Microsoft\Windows\UpdateOrchestrator\Maintenance Install"
#"\Microsoft\Windows\UpdateOrchestrator\Policy Install"
#"\Microsoft\Windows\UpdateOrchestrator\Reboot"
#"\Microsoft\Windows\UpdateOrchestrator\Resume On Boot"
#"\Microsoft\Windows\UpdateOrchestrator\Schedule Scan"
#"\Microsoft\Windows\UpdateOrchestrator\USO_UxBroker_Display"
#"\Microsoft\Windows\UpdateOrchestrator\USO_UxBroker_ReadyToReboot"
#"\Microsoft\Windows\UpdateOrchestrator\Maintenance Install"
#"\Microsoft\Windows\UpdateOrchestrator\Policy Install"
#"\Microsoft\Windows\UpdateOrchestrator\Reboot"
#"\Microsoft\Windows\UpdateOrchestrator\Resume On Boot"
#"\Microsoft\Windows\UpdateOrchestrator\Schedule Scan"
#"\Microsoft\Windows\UpdateOrchestrator\USO_UxBroker_Display"
#"\Microsoft\Windows\UpdateOrchestrator\USO_UxBroker_ReadyToReboot"
#"\Microsoft\Windows\UPnP\UPnPHostConfig"
#"\Microsoft\Windows\UPnP\UPnPHostConfig"
#"\Microsoft\Windows\User Profile Service\HiveUploadTask"
#"\Microsoft\Windows\User Profile Service\HiveUploadTask"
#"\Microsoft\Windows\WCM\WiFiTask"
#"\Microsoft\Windows\WCM\WiFiTask"
#"\Microsoft\Windows\WDI\ResolutionHost"
#"\Microsoft\Windows\WDI\ResolutionHost"
"\Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance"
"\Microsoft\Windows\Windows Defender\Windows Defender Cleanup"
"\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan"
"\Microsoft\Windows\Windows Defender\Windows Defender Verification"
"\Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance"
"\Microsoft\Windows\Windows Defender\Windows Defender Cleanup"
"\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan"
"\Microsoft\Windows\Windows Defender\Windows Defender Verification"
"\Microsoft\Windows\Windows Error Reporting\QueueReporting"
"\Microsoft\Windows\Windows Error Reporting\QueueReporting"
#"\Microsoft\Windows\Windows Filtering Platform\BfeOnServiceStartTypeChange"
#"\Microsoft\Windows\Windows Filtering Platform\BfeOnServiceStartTypeChange"
#"\Microsoft\Windows\Windows Media Sharing\UpdateLibrary"
#"\Microsoft\Windows\Windows Media Sharing\UpdateLibrary"
#"\Microsoft\Windows\WindowsColorSystem\Calibration Loader"
#"\Microsoft\Windows\WindowsColorSystem\Calibration Loader"
#"\Microsoft\Windows\WindowsUpdate\Automatic App Update"
#"\Microsoft\Windows\WindowsUpdate\Scheduled Start"
#"\Microsoft\Windows\WindowsUpdate\sih"
#"\Microsoft\Windows\WindowsUpdate\sihboot"
#"\Microsoft\Windows\WindowsUpdate\Automatic App Update"
#"\Microsoft\Windows\WindowsUpdate\Scheduled Start"
#"\Microsoft\Windows\WindowsUpdate\sih"
#"\Microsoft\Windows\WindowsUpdate\sihboot"
#"\Microsoft\Windows\Wininet\CacheTask"
#"\Microsoft\Windows\Wininet\CacheTask"
#"\Microsoft\Windows\WOF\WIM-Hash-Management"
#"\Microsoft\Windows\WOF\WIM-Hash-Validation"
#"\Microsoft\Windows\WOF\WIM-Hash-Management"
#"\Microsoft\Windows\WOF\WIM-Hash-Validation"
#"\Microsoft\Windows\Work Folders\Work Folders Logon Synchronization"
#"\Microsoft\Windows\Work Folders\Work Folders Maintenance Work"
#"\Microsoft\Windows\Work Folders\Work Folders Logon Synchronization"
#"\Microsoft\Windows\Work Folders\Work Folders Maintenance Work"
#"\Microsoft\Windows\Workplace Join\Automatic-Device-Join"
#"\Microsoft\Windows\Workplace Join\Automatic-Device-Join"
#"\Microsoft\Windows\WS\License Validation"
#"\Microsoft\Windows\WS\WSTask"
#"\Microsoft\Windows\WS\License Validation"
#"\Microsoft\Windows\WS\WSTask"
# Scheduled tasks which cannot be disabled
#"\Microsoft\Windows\Device Setup\Metadata Refresh"
#"\Microsoft\Windows\SettingSync\BackgroundUploadTask"
# Scheduled tasks which cannot be disabled
#"\Microsoft\Windows\Device Setup\Metadata Refresh"
#"\Microsoft\Windows\SettingSync\BackgroundUploadTask"
)
foreach ($task in $tasks) {
$parts = $task.split('\')
$name = $parts[-1]
$path = $parts[0..($parts.length-2)] -join '\'
$parts = $task.split('\')
$name = $parts[-1]
$path = $parts[0..($parts.length - 2)] -join '\'
Disable-ScheduledTask -TaskName "$name" -TaskPath "$path" -ErrorAction SilentlyContinue
Disable-ScheduledTask -TaskName "$name" -TaskPath "$path" -ErrorAction SilentlyContinue
}

2
utils/enable-god-mode.ps1

@ -15,5 +15,5 @@ Write-Output @"
# #
###############################################################################
"@
$DesktopPath = [Environment]::GetFolderPath("Desktop");
$DesktopPath = [environment]::GetFolderPath("Desktop");
mkdir "$DesktopPath\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}"

76
utils/install-basic-software.ps1

@ -4,58 +4,58 @@
# into your default drive's root directory.
$packages = @(
"notepadplusplus.install"
"peazip.install"
#"7zip.install"
#"aimp"
#"audacity"
#"autoit"
#"classic-shell"
#"filezilla"
#"firefox"
#"gimp"
#"google-chrome-x64"
#"imgburn"
#"keepass.install"
#"paint.net"
#"putty"
#"python"
#"qbittorrent"
#"speedcrunch"
#"sysinternals"
#"thunderbird"
#"vlc"
#"windirstat"
#"wireshark"
"notepadplusplus.install"
"peazip.install"
#"7zip.install"
#"aimp"
#"audacity"
#"autoit"
#"classic-shell"
#"filezilla"
#"firefox"
#"gimp"
#"google-chrome-x64"
#"imgburn"
#"keepass.install"
#"paint.net"
#"putty"
#"python"
#"qbittorrent"
#"speedcrunch"
#"sysinternals"
#"thunderbird"
#"vlc"
#"windirstat"
#"wireshark"
)
echo "Setting up Chocolatey software package manager"
Write-Output "Setting up Chocolatey software package manager"
Get-PackageProvider -Name chocolatey -Force
echo "Setting up Full Chocolatey Install"
Write-Output "Setting up Full Chocolatey Install"
Install-Package -Name Chocolatey -Force -ProviderName chocolatey
$chocopath = (Get-Package chocolatey | ?{$_.Name -eq "chocolatey"} | Select @{N="Source";E={((($a=($_.Source -split "\\"))[0..($a.length - 2)]) -join "\"),"Tools\chocolateyInstall" -join "\"}} | Select -ExpandProperty Source)
$chocopath = (Get-Package chocolatey | Where-Object { $_.Name -eq "chocolatey" } | Select-Object @{ N = "Source"; E = { ((($a = ($_.Source -split "\\"))[0..($a.length - 2)]) -join "\"),"Tools\chocolateyInstall" -join "\" } } | Select-Object -ExpandProperty Source)
& $chocopath "upgrade all -y"
choco install chocolatey-core.extension --force
echo "Creating daily task to automatically upgrade Chocolatey packages"
Write-Output "Creating daily task to automatically upgrade Chocolatey packages"
# adapted from https://blogs.technet.microsoft.com/heyscriptingguy/2013/11/23/using-scheduled-tasks-and-scheduled-jobs-in-powershell/
$ScheduledJob = @{
Name = "Chocolatey Daily Upgrade"
ScriptBlock = {choco upgrade all -y}
Trigger = New-JobTrigger -Daily -at 2am
ScheduledJobOption = New-ScheduledJobOption -RunElevated -MultipleInstancePolicy StopExisting -RequireNetwork
Name = "Chocolatey Daily Upgrade"
ScriptBlock = { choco upgrade all -y }
Trigger = New-JobTrigger -Daily -at 2am
ScheduledJobOption = New-ScheduledJobOption -RunElevated -MultipleInstancePolicy StopExisting -RequireNetwork
}
Register-ScheduledJob @ScheduledJob
echo "Installing Packages"
$packages | %{choco install $_ --force -y}
Write-Output "Installing Packages"
$packages | ForEach-Object { choco install $_ --force -y }
echo "Installing Sysinternals Utilities to C:\Sysinternals"
Write-Output "Installing Sysinternals Utilities to C:\Sysinternals"
$download_uri = "https://download.sysinternals.com/files/SysinternalsSuite.zip"
$wc = new-object net.webclient
$wc.DownloadFile($download_uri, "/SysinternalsSuite.zip")
$wc = New-Object net.webclient
$wc.DownloadFile($download_uri,"/SysinternalsSuite.zip")
Add-Type -AssemblyName "system.io.compression.filesystem"
[io.compression.zipfile]::ExtractToDirectory("/SysinternalsSuite.zip", "/Sysinternals")
echo "Removing zipfile"
[io.compression.zipfile]::ExtractToDirectory("/SysinternalsSuite.zip","/Sysinternals")
Write-Output "Removing zipfile"
rm "/SysinternalsSuite.zip"

Loading…
Cancel
Save