@ -2,8 +2,8 @@
. SYNOPSIS
" Windows 10 Setup Script " is a set of tweaks for OS fine-tuning and automating the routine tasks
Version : v4 . 5 . 3
Date : 23 . 06 . 2020
Version : v4 . 5 . 4
Date : 29 . 06 . 2020
Copyright ( c ) 2020 farag & oZ-Zo
Thanks to all http : / / forum . ru-board . com members involved
@ -15,9 +15,10 @@
Tested on Home / Pro / Enterprise editions
Due to the fact that the script includes about 150 functions ,
you should read the entire script and comment out those sections that you do not want to be execute
you must read the entire script and comment out those sections that you do not want to be executed ,
otherwise likely you will enable features that you do not want to be enabled
Running the script is best done on a fresh install because running the scr ip t on tweaked system may result in occurring errors
Running the script is best done on a fresh install because running it on tweaked system may result in errors occurring
Check whether the . ps1 file is encoded in UTF - 8 with BOM
The script can not be executed via PowerShell ISE
@ -615,13 +616,6 @@ switch ($Result)
}
}
# Show accent color on Start, taskbar, and action center
# Отображать цвет элементов в меню "Пуск", на панели задач и в центре уведомлений
if ( ( Get-ItemPropertyValue -Path HKCU : \ Software \ Microsoft \ Windows \ CurrentVersion \ Themes \ Personalize -Name SystemUsesLightTheme ) -ne 1 )
{
New-ItemProperty -Path HKCU : \ Software \ Microsoft \ Windows \ CurrentVersion \ Themes \ Personalize -Name ColorPrevalence -PropertyType DWord -Value 1 -Force
}
# Show accent color on the title bars and window borders
# Отображать цвет элементов в заголовках окон и границ окон
New-ItemProperty -Path HKCU : \ Software \ Microsoft \ Windows \ DWM -Name ColorPrevalence -PropertyType DWord -Value 1 -Force
@ -2431,7 +2425,7 @@ if (Get-AppxPackage -Name Microsoft.ZuneVideo)
# Turn off Cortana autostarting
# Удалить Кортана из автозагрузки
if ( Get-AppxPackage -AllUsers - Name Microsoft . 549981C3F5F10 )
if ( Get-AppxPackage -Name Microsoft . 549981C3F5F10 )
{
if ( -not ( Test-Path -Path " Registry::HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\Microsoft.549981C3F5F10_8wekyb3d8bbwe\CortanaStartupId " ) )
{
@ -2455,33 +2449,6 @@ New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -Prope
# Отключить советы Xbox Game Bar
New-ItemProperty -Path HKCU : \ Software \ Microsoft \ GameBar -Name ShowStartupPanel -PropertyType DWord -Value 0 -Force
<#
Uninstall all Xbox related UWP apps from all accounts
App packages will not be installed when new user accounts are created
Удалить все UWP - приложения , связанные с Xbox , из всех учетных записей
Приложения не будут установлены при создании новых учетных записей
#>
$XboxAppxPackages = @ (
# Xbox Identity Provider
# Поставщик удостоверений Xbox
" Microsoft.XboxIdentityProvider "
# Xbox
# Компаньон консоли Xbox
" Microsoft.XboxApp "
# Xbox TCUI
" Microsoft.Xbox.TCUI "
# Xbox Speech To Text Overlay
" Microsoft.XboxSpeechToTextOverlay "
# Xbox Game Bar
" Microsoft.XboxGamingOverlay "
# Xbox Game Bar Plugin
" Microsoft.XboxGameOverlay "
)
$OFS = " | "
Get-AppxPackage -PackageTypeFilter Bundle -AllUsers | Where-Object -FilterScript { $_ . Name -cmatch $XboxAppxPackages } | Remove-AppxPackage -AllUsers -Verbose
$OFS = " "
# Set "High performance" in graphics performance preference for apps
# Установить параметры производительности графики для отдельных приложений на "Высокая производительность"
if ( Get-CimInstance -ClassName Win32_VideoController | Where-Object -FilterScript { $_ . AdapterDACType -ne " Internal " -and $null -ne $_ . AdapterDACType } )
@ -3051,8 +3018,8 @@ switch ($Result)
# Включить защиту сети в Microsoft Defender Exploit Guard
Set-MpPreference -EnableNetworkProtection Enabled
# Turn on detection for potentially unwanted applications
# Включить обнаружение потенциально нежелательных приложений
# Turn on detection for potentially unwanted applications and block them
# Включить обнаружение потенциально нежелательных приложений и блокировать их
Set-MpPreference -PUAProtection Enabled
# Run Microsoft Defender within a sandbox
@ -3070,6 +3037,7 @@ New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows Security Health\State"
# Turn on events auditing generated when a process is created or starts
# Включить аудит событий, возникающих при создании или запуске процесса
auditpol / set / subcategory : " {0CCE922B-69AE-11D9-BED3-505054503030} " / success : enable / failure : enable
$ProcessCreation = $true
# Include command line in process creation events
# Включать командную строку в событиях создания процесса
@ -3077,27 +3045,23 @@ if ($RU)
{
$OutputEncoding = [System.Console] :: OutputEncoding = [System.Console] :: InputEncoding = [System.Text.Encoding] :: UTF8
}
$ProcessCreation = auditpol / get / subcategory : " {0CCE922B-69AE-11D9-BED3-505054503030} " / r | ConvertFrom-Csv | Select-Object -ExpandProperty " Inclusion Setting "
if ( $ProcessCreation -ne " No Auditing " )
if ( $ProcessCreation )
{
New-ItemProperty -Path HKLM : \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Policies \ System \ Audit -Name ProcessCreationIncludeCmdLine_Enabled -PropertyType DWord -Value 1 -Force
$ProcessCreationIncludeCmdLine_Enabled = $true
}
# Create "Process Creation" Event Viewer Custom View
# Создать настаиваемое представление "Создание процесса" в Настраиваемых представлениях
# Создать настаиваемое представление "Создание процесса" в Просмотре событий
if ( $RU )
{
$OutputEncoding = [System.Console] :: OutputEncoding = [System.Console] :: InputEncoding = [System.Text.Encoding] :: UTF8
}
$ProcessCreation = auditpol / get / subcategory : " {0CCE922B-69AE-11D9-BED3-505054503030} " / r | ConvertFrom-Csv | Select-Object -ExpandProperty " Inclusion Setting "
if ( Get-ItemProperty -Path HKLM : \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Policies \ System \ Audit -Name ProcessCreationIncludeCmdLine_Enabled -ErrorAction Ignore )
{
$ProcessCreationIncludeCmdLine_Enabled = $true
}
if ( ( $ProcessCreation -ne " No Au diting " ) -and ( $ProcessCreationIncludeCmdLine_Enabled -eq $true ) )
if ( $ProcessCreation -and $ProcessCreationIncludeCmdLine_Enabled )
{
$XMLfile = @ "
$XML = @ "
< ViewerConfig >
< QueryConfig >
< QueryParams >
@ -3115,14 +3079,18 @@ if (($ProcessCreation -ne "No Auditing") -and ($ProcessCreationIncludeCmdLine_En
< / QueryConfig >
< / ViewerConfig >
" @
$ProcessCreationPath = " $ env:ProgramData\Microsoft\Event Viewer\Views\ProcessCreation.xml "
if ( -not ( Test-Path -Path " $ env:ProgramData\Microsoft\Event Viewer\Views " ) )
{
New-Item -Path " $ env:ProgramData\Microsoft\Event Viewer\Views " -ItemType Directory -Force
}
$ProcessCreationFilePath = " $ env:ProgramData\Microsoft\Event Viewer\Views\ProcessCreation.xml "
# Saving ProcessCreation.xml in UTF-8 encoding
# Сохраняем ProcessCreation.xml в кодировке UTF-8
Set-Content -Value ( New-Object System . Text . UTF8Encoding ) . GetBytes ( $XMLfile ) -Encoding Byte -Path $ProcessCreationPath -Force
Set-Content -Value ( New-Object System . Text . UTF8Encoding ) . GetBytes ( $XML ) -Encoding Byte -Path $ProcessCreationFile Path -Force
if ( $RU )
{
[xml] $XML = Get-Content -Path $ProcessCreationPath
[xml] $XML = Get-Content -Path $ProcessCreationFile Path
$XML . ViewerConfig . QueryConfig . QueryNode . Name = " Создание процесса "
$XML . ViewerConfig . QueryConfig . QueryNode . Description = " События содания нового процесса и аудит командной строки "
$xml . Save ( " $ env:ProgramData\Microsoft\Event Viewer\Views\ProcessCreation.xml " )