aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/windows/disable-update-orchestrator.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'coin/provisioning/common/windows/disable-update-orchestrator.ps1')
-rw-r--r--coin/provisioning/common/windows/disable-update-orchestrator.ps119
1 files changed, 19 insertions, 0 deletions
diff --git a/coin/provisioning/common/windows/disable-update-orchestrator.ps1 b/coin/provisioning/common/windows/disable-update-orchestrator.ps1
new file mode 100644
index 00000000..95922d47
--- /dev/null
+++ b/coin/provisioning/common/windows/disable-update-orchestrator.ps1
@@ -0,0 +1,19 @@
+# Disable UpdateOrchestrator
+
+$name = "UpdateOrchestrator"
+$path = "C:\Windows\System32\Tasks\Microsoft\Windows\$name"
+
+takeown /F $path /A /R
+icacls $path /grant Administrators:F /T
+SCHTASKS /Change /TN "Microsoft\Windows\$name\Reboot" /DISABLE
+del "$path\Combined Scan Download Install"
+del "$path\Maintenance Install"
+del "$path\Reboot"
+del "$path\Policy Install"
+del "$path\Refresh Settings"
+del "$path\Resume On Boot"
+del "$path\USO_UxBroker_Display"
+del "$path\USO_UxBroker_ReadyToReboot"
+
+# Disable Update orchestrator service
+reg.exe ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsoSvc" /V Start /T REG_dWORD /D 4 /F