From b53afd0fb7c137f5370e0e2e64743094d43a9cac Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 7 Sep 2022 15:17:31 -0500 Subject: [PATCH] Update winutil.ps1 --- winutil.ps1 | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index ee470b4d..d9480c0b 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -1062,23 +1062,23 @@ $WPFtweaksbutton.Add_Click({ Write-Host "Finished Removing Bloatware Apps" $WPFEssTweaksDeBloat.IsChecked = $false - - Write-Host "Doing Security checks for Administrator Account and Group Policy" - if(($(Get-WMIObject -class Win32_ComputerSystem | select username).username).IndexOf('Administrator') -eq -1){ - net user administrator /active:no - } - - if(!(((Get-ComputerInfo).WindowsEditionId).IndexOf('Core') -eq -1) -or !(((Get-ComputerInfo).WindowsEditionId).IndexOf('Home') -eq -1)){ # Not sure if home edition is Core or Home - Write-Host "Enabling gpedit.msc...Group Policy for Home Users" - Get-ChildItem @( - "C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package*.mum", - "C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package*.mum" - ) | ForEach-Object { dism.exe /online /norestart /add-package:"$_" } - } - Write-Host "=================================" - Write-Host "-- Tweaks are Finished ---" - Write-Host "=================================" } + Write-Host "Doing Security checks for Administrator Account and Group Policy" + if(($(Get-WMIObject -class Win32_ComputerSystem | select username).username).IndexOf('Administrator') -eq -1){ + net user administrator /active:no + } + + if(!(((Get-ComputerInfo).WindowsEditionId).IndexOf('Core') -eq -1) -or !(((Get-ComputerInfo).WindowsEditionId).IndexOf('Home') -eq -1)){ # Not sure if home edition is Core or Home + Write-Host "Enabling gpedit.msc...Group Policy for Home Users" + Get-ChildItem @( + "C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package*.mum", + "C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package*.mum" + ) | ForEach-Object { dism.exe /online /norestart /add-package:"$_" } + } + Write-Host "=================================" + Write-Host "-- Tweaks are Finished ---" + Write-Host "=================================" + $ButtonType = [System.Windows.MessageBoxButton]::OK $MessageboxTitle = "Tweaks are Finished " $Messageboxbody = ("Done")