diff --git a/src/Sophia_Script_for_Windows_10/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_10/Localizations/en-US/Sophia.psd1 index 6dfca13d..4363fc6d 100644 --- a/src/Sophia_Script_for_Windows_10/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10/Localizations/en-US/Sophia.psd1 @@ -40,8 +40,8 @@ CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates -SoftwareDistributionTaskNotificationEvent = The Windows update cache successfully deleted -TempTaskNotificationEvent = The temp files folder successfully cleaned up +SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted +TempTaskNotificationEvent = Temporary files folder successfully cleaned up FolderTaskDescription = The {0} folder cleanup EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 index 2a8f8caa..c57c29fe 100644 --- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 @@ -740,7 +740,7 @@ function DiagnosticDataLevel "Default" { # Optional diagnostic data - Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/en-US/Sophia.psd1 index 13c3f8df..b5f7090f 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/en-US/Sophia.psd1 @@ -31,8 +31,8 @@ CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates -SoftwareDistributionTaskNotificationEvent = The Windows update cache successfully deleted -TempTaskNotificationEvent = The temp files folder successfully cleaned up +SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted +TempTaskNotificationEvent = Temporary files folder successfully cleaned up FolderTaskDescription = The {0} folder cleanup EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 index 9733fd7e..f6a6d5bc 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 @@ -683,7 +683,7 @@ function DiagnosticDataLevel "Default" { # Full level - Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force @@ -10029,7 +10029,7 @@ function UpdateLGPEPolicies if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]")) { - Write-Verbose -Message $Item.Replace("{}", "") -Verbose + Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""))) -Verbose $Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item)) { @@ -10062,6 +10062,10 @@ function UpdateLGPEPolicies } } + Write-Verbose -Message $Localization.Patient -Verbose + Write-Verbose -Message $Localization.GPOUpdate -Verbose + Write-Information -MessageData "" -InformationAction Continue + # Current User policies paths to scan recursively $CU_Paths = @( "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies", @@ -10084,7 +10088,7 @@ function UpdateLGPEPolicies if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]")) { - Write-Verbose -Message $Item.Replace("{}", "") -Verbose + Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""))) -Verbose $Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item)) { diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/en-US/Sophia.psd1 index e942b0fa..63e6e98b 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/en-US/Sophia.psd1 @@ -33,8 +33,8 @@ CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates -SoftwareDistributionTaskNotificationEvent = The Windows update cache successfully deleted -TempTaskNotificationEvent = The temp files folder successfully cleaned up +SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted +TempTaskNotificationEvent = Temporary files folder successfully cleaned up FolderTaskDescription = The {0} folder cleanup EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 index 52731903..fbbd53af 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 @@ -683,7 +683,7 @@ function DiagnosticDataLevel "Default" { # Optional diagnostic data - Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force @@ -11250,7 +11250,7 @@ function UpdateLGPEPolicies if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]")) { - Write-Verbose -Message $Item.Replace("{}", "") -Verbose + Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""))) -Verbose $Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item)) { @@ -11283,6 +11283,10 @@ function UpdateLGPEPolicies } } + Write-Verbose -Message $Localization.Patient -Verbose + Write-Verbose -Message $Localization.GPOUpdate -Verbose + Write-Information -MessageData "" -InformationAction Continue + # Current User policies paths to scan recursively $CU_Paths = @( "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies", @@ -11305,7 +11309,7 @@ function UpdateLGPEPolicies if ($config.SelectSingleNode("//*[local-name()='policy' and @key='$($SplitPath.ToLower())' and (@valueName='$($Item.ToLower())' or @Name='$($Item.ToLower())' or .//*[local-name()='enum' and @valueName='$($Item.ToLower())'])]")) { - Write-Verbose -Message $Item.Replace("{}", "") -Verbose + Write-Verbose -Message ([string]($SplitPath, "|", $Item.Replace("{}", ""))) -Verbose $Type = switch ((Get-Item -Path $Path.PSPath).GetValueKind($Item)) { diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/en-US/Sophia.psd1 index 6dfca13d..4363fc6d 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/en-US/Sophia.psd1 @@ -40,8 +40,8 @@ CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates -SoftwareDistributionTaskNotificationEvent = The Windows update cache successfully deleted -TempTaskNotificationEvent = The temp files folder successfully cleaned up +SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted +TempTaskNotificationEvent = Temporary files folder successfully cleaned up FolderTaskDescription = The {0} folder cleanup EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 index 3025b7d2..cda169db 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 @@ -742,7 +742,7 @@ function DiagnosticDataLevel "Default" { # Optional diagnostic data - Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force diff --git a/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 index d69c60ab..c3d9fb47 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 @@ -40,8 +40,8 @@ CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates -SoftwareDistributionTaskNotificationEvent = The Windows update cache successfully deleted -TempTaskNotificationEvent = The temp files folder successfully cleaned up +SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted +TempTaskNotificationEvent = Temporary files folder successfully cleaned up FolderTaskDescription = The {0} folder cleanup EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 index b8a22760..f6975fad 100644 --- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 @@ -728,7 +728,7 @@ function DiagnosticDataLevel "Default" { # Optional diagnostic data - Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/en-US/Sophia.psd1 index d69c60ab..c3d9fb47 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/en-US/Sophia.psd1 @@ -40,8 +40,8 @@ CleanupTaskNotificationTitle = Windows clean up CleanupTaskNotificationEvent = Run task to clean up Windows unused files and updates? CleanupTaskDescription = Cleaning up Windows unused files and updates using built-in Disk cleanup app CleanupNotificationTaskDescription = Pop-up notification reminder about cleaning up Windows unused files and updates -SoftwareDistributionTaskNotificationEvent = The Windows update cache successfully deleted -TempTaskNotificationEvent = The temp files folder successfully cleaned up +SoftwareDistributionTaskNotificationEvent = Windows update cache successfully deleted +TempTaskNotificationEvent = Temporary files folder successfully cleaned up FolderTaskDescription = The {0} folder cleanup EventViewerCustomViewName = Process Creation EventViewerCustomViewDescription = Process creation and command-line auditing events diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 index b89c5986..72518d03 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 @@ -730,7 +730,7 @@ function DiagnosticDataLevel "Default" { # Optional diagnostic data - Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force + Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type CLEAR New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force