Browse Source

Add files via upload

pull/174/head
Dmitry Nefedov 3 years ago
committed by GitHub
parent
commit
adb8270ebd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      Sophia/PowerShell 5.1/Functions.ps1
  2. 14
      Sophia/PowerShell 5.1/Sophia.ps1
  3. BIN
      Sophia/PowerShell 5.1/Sophia.psd1
  4. 36
      Sophia/PowerShell 5.1/Sophia.psm1

10
Sophia/PowerShell 5.1/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) 20142021 farag
Copyright (c) 20192021 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
@ -139,14 +139,10 @@ $Parameters = @{
{
# The "Function -Argument" construction
$Command + " " + "-" + $ParameterSet | Where-Object -FilterScript {$_ -like "*$wordToComplete*"} | ForEach-Object -Process {"`"$_`""}
continue
}
# Get functions list without arguments to complete
Get-Command -Name $Command | Where-Object -FilterScript {$null -eq $_.Parametersets.Parameters} | Where-Object -FilterScript {$_.Name -like "*$wordToComplete*"}
continue
}
}
}

14
Sophia/PowerShell 5.1/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) 20142021 farag
Copyright (c) 20192021 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

BIN
Sophia/PowerShell 5.1/Sophia.psd1

Binary file not shown.

36
Sophia/PowerShell 5.1/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) 20142021 farag
Copyright (c) 20192021 farag & oZ-Zo
@ -228,7 +228,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
@ -269,14 +269,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
}
}
}
@ -328,11 +334,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
}
}
}
@ -6126,8 +6138,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
{
@ -6170,6 +6182,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
}
<#

Loading…
Cancel
Save