From 11b7f74b06d0921556f3bb9c7914ebcc6b6352ed Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Tue, 27 Apr 2021 15:29:57 +0300 Subject: [PATCH] 27.04.2021 v5.10.3 --- Sophia/PowerShell 7/Functions.ps1 | 6 +++--- Sophia/PowerShell 7/Sophia.ps1 | 14 ++++++------ Sophia/PowerShell 7/Sophia.psd1 | 4 ++-- Sophia/PowerShell 7/Sophia.psm1 | 36 +++++++++++++++++++++++++------ 4 files changed, 41 insertions(+), 19 deletions(-) diff --git a/Sophia/PowerShell 7/Functions.ps1 b/Sophia/PowerShell 7/Functions.ps1 index f2710fbc..74584444 100644 --- a/Sophia/PowerShell 7/Functions.ps1 +++ b/Sophia/PowerShell 7/Functions.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS The TAB completion for functions and their arguments - Version: v5.10.2 - Date: 22.04.2021 + Version: v5.10.3 + Date: 27.04.2021 Copyright (c) 2014–2021 farag Copyright (c) 2019–2021 farag & oZ-Zo @@ -66,7 +66,7 @@ function Sophia Clear-Host -$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.2 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021" +$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.3 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Sophia.psd1 -PassThru -Force diff --git a/Sophia/PowerShell 7/Sophia.ps1 b/Sophia/PowerShell 7/Sophia.ps1 index d16035b6..fbb2e9cd 100644 --- a/Sophia/PowerShell 7/Sophia.ps1 +++ b/Sophia/PowerShell 7/Sophia.ps1 @@ -2,8 +2,8 @@ .SYNOPSIS Default preset file for "Windows 10 Sophia Script" - Version: v5.10.2 - Date: 22.04.2021 + Version: v5.10.3 + Date: 27.04.2021 Copyright (c) 2014–2021 farag Copyright (c) 2019–2021 farag & oZ-Zo @@ -71,7 +71,7 @@ param Clear-Host -$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.2 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021" +$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.3 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021" Remove-Module -Name Sophia -Force -ErrorAction Ignore Import-Module -Name $PSScriptRoot\Sophia.psd1 -PassThru -Force @@ -757,19 +757,19 @@ WinPrtScrFolder -Desktop <# Run troubleshooters automatically, then notify - In order this feature to work the OS level of diagnostic data gathering must be set to "Optional diagnostic data" + In order this feature to work the OS level of diagnostic data gathering will be set to "Optional diagnostic data", and the error reporting feature will be turned on Автоматически запускать средства устранения неполадок, а затем уведомлять - Необходимо установить уровень сбора диагностических сведений ОС на "Необязательные диагностические данные", чтобы работала данная функция + Чтобы заработала данная функция, уровень сбора диагностических сведений ОС будет установлен на "Необязательные диагностические данные" и включится создание отчетов об ошибках Windows #> RecommendedTroubleshooting -Automatic <# Ask me before running troubleshooters (default value) - In order this feature to work the OS level of diagnostic data gathering must be set to "Optional diagnostic data" + In order this feature to work the OS level of diagnostic data gathering will be set to "Optional diagnostic data" Спрашивать перед запуском средств устранения неполадок (значение по умолчанию) - Необходимо установить уровень сбора диагностических сведений ОС на "Необязательные диагностические данные", чтобы работала данная функция + Чтобы заработала данная функция, уровень сбора диагностических сведений ОС будет установлен на "Необязательные диагностические данные" и включится создание отчетов об ошибках Windows #> # RecommendedTroubleshooting -Default diff --git a/Sophia/PowerShell 7/Sophia.psd1 b/Sophia/PowerShell 7/Sophia.psd1 index a2abeba1..27655d4f 100644 --- a/Sophia/PowerShell 7/Sophia.psd1 +++ b/Sophia/PowerShell 7/Sophia.psd1 @@ -1,9 +1,9 @@ @{ RootModule = 'Sophia.psm1' - ModuleVersion = '5.10.2' + ModuleVersion = '5.10.3' GUID = 'aa0b47a7-1770-4b5d-8c9f-cc6c505bcc7a' Author = 'Dmitry "farag" Nefedov' - Copyright = '(c) 2015–2021 farag & oZ-Zo. All rights reserved.' + Copyright = '(c) 2014–2021 farag & oZ-Zo. All rights reserved.' Description = 'Module for Windows 10 fine-tuning and automating the routine tasks' PowerShellVersion = '7.1' ProcessorArchitecture = 'AMD64' diff --git a/Sophia/PowerShell 7/Sophia.psm1 b/Sophia/PowerShell 7/Sophia.psm1 index 1d20fbce..8078de59 100644 --- a/Sophia/PowerShell 7/Sophia.psm1 +++ b/Sophia/PowerShell 7/Sophia.psm1 @@ -2,8 +2,8 @@ .SYNOPSIS "Windows 10 Sophia Script" is a PowerShell module for Windows 10 fine-tuning and automating the routine tasks - Version: v5.10.2 - Date: 22.04.2021 + Version: v5.10.3 + Date: 27.04.2021 Copyright (c) 2014–2021 farag Copyright (c) 2019–2021 farag & oZ-Zo @@ -231,7 +231,7 @@ function DiagTrackService Set the OS level of diagnostic data gathering to minimum .PARAMETER Default - Set the OS level of diagnostic data gathering to minimum + Set the OS level of diagnostic data gathering to default .EXAMPLE DiagnosticDataLevel -Minimal @@ -272,14 +272,20 @@ function DiagnosticDataLevel } else { - # Optional diagnostic data + # Required diagnostic data New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 1 -Force } + New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 1 -Force + + New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 1 -Force } "Default" { - # Required diagnostic data + # Optional diagnostic data New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 3 -Force + 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 } } } @@ -331,11 +337,17 @@ function ErrorReporting Get-ScheduledTask -TaskName QueueReporting | Disable-ScheduledTask New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name Disabled -PropertyType DWord -Value 1 -Force } + + Get-Service -Name WerSvc | Stop-Service -Force + Get-Service -Name WerSvc | Set-Service -StartupType Disabled } "Enable" { Get-ScheduledTask -TaskName QueueReporting | Enable-ScheduledTask Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction SilentlyContinue + + Get-Service -Name WerSvc | Set-Service -StartupType Manual + Get-Service -Name WerSvc | Start-Service } } } @@ -6140,8 +6152,8 @@ function WinPrtScrFolder RecommendedTroubleshooting -Default .NOTES - Current user - In order this feature to work the OS level of diagnostic data gathering must be set to "Optional diagnostic data" + Machine-wide + In order this feature to work the OS level of diagnostic data gathering will be set to "Optional diagnostic data" and the error reporting feature will be turned on #> function RecommendedTroubleshooting { @@ -6184,6 +6196,16 @@ function RecommendedTroubleshooting # Set the OS level of diagnostic data gathering to "Optional diagnostic data" New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 3 -Force + 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 + + # Turn on Windows Error Reporting + Get-ScheduledTask -TaskName QueueReporting | Enable-ScheduledTask + Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name Disabled -Force -ErrorAction SilentlyContinue + + Get-Service -Name WerSvc | Set-Service -StartupType Manual + Get-Service -Name WerSvc | Start-Service } <#