浏览代码

Added Start-Transcript

Richard Newton 6 年之前
父节点
当前提交
7a1a7125f3
共有 1 个文件被更改,包括 9 次插入8 次删除
  1. 9 8
      Windows10DebloaterGUI.ps1

+ 9 - 8
Windows10DebloaterGUI.ps1

@@ -129,6 +129,8 @@ Else {
     Write-Output "The folder $DebloatFolder was successfully created."
     Write-Output "The folder $DebloatFolder was successfully created."
 }
 }
 
 
+Start-Transcript -OutputDirectory "$DebloatFolder"
+
 #region gui events {
 #region gui events {
 $RemoveBlacklist.Add_Click( { 
 $RemoveBlacklist.Add_Click( { 
         $ErrorActionPreference = 'silentlycontinue'
         $ErrorActionPreference = 'silentlycontinue'
@@ -246,7 +248,7 @@ If (Get-Service -Name dmwappushservice | Where-Object {$_.StartType -eq "Disable
 If(Get-Service -Name dmwappushservice | Where-Object {$_.Status -eq "Stopped"}) {
 If(Get-Service -Name dmwappushservice | Where-Object {$_.Status -eq "Stopped"}) {
    Start-Service -Name dmwappushservice} 
    Start-Service -Name dmwappushservice} 
   }
   }
-}
+
 
 
         Function DebloatAll {
         Function DebloatAll {
     
     
@@ -500,15 +502,14 @@ If(Get-Service -Name dmwappushservice | Where-Object {$_.Status -eq "Stopped"})
   
   
         Function CheckDMWService {
         Function CheckDMWService {
 
 
-  Param([switch]$Debloat)
+        Param([switch]$Debloat)
   
   
-If (Get-Service -Name dmwappushservice | Where-Object {$_.StartType -eq "Disabled"}) {
-    Set-Service -Name dmwappushservice -StartupType Automatic}
+        If (Get-Service -Name dmwappushservice | Where-Object {$_.StartType -eq "Disabled"}) {
+            Set-Service -Name dmwappushservice -StartupType Automatic}
 
 
-If(Get-Service -Name dmwappushservice | Where-Object {$_.Status -eq "Stopped"}) {
-   Start-Service -Name dmwappushservice} 
-  }
-}
+        If(Get-Service -Name dmwappushservice | Where-Object {$_.Status -eq "Stopped"}) {
+        Start-Service -Name dmwappushservice} 
+        }
         
         
         Function CheckInstallService {
         Function CheckInstallService {