浏览代码

Added ForEach loop.

Richard Newton 6 年之前
父节点
当前提交
57c155e220
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Individual Scripts/Remove Bloatware RegKeys

+ 7 - 0
Individual Scripts/Remove Bloatware RegKeys

@@ -29,3 +29,10 @@ $Keys = @(
                
         #Windows Share Target
         "HKCR:\Extensions\ContractId\Windows.ShareTarget\PackageId\ActiproSoftwareLLC.562882FEEB491_2.6.18.18_neutral__24pqs290vpjk0"
+    )
+        
+    #This writes the output of each key it is removing and also removes the keys listed above.
+    ForEach ($Key in $Keys) {
+        Write-Output "Removing $Key from registry"
+        Remove-Item $Key -Recurse
+    }