Browse Source

Update Win 10.ps1

pull/3/head
farag2 6 years ago
committed by GitHub
parent
commit
1e48bf818f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      Win 10.ps1

19
Win 10.ps1

@ -3,7 +3,6 @@ $services = @(
"CDPSvc", "CDPSvc",
"DiagTrack", "DiagTrack",
"DusmSvc", "DusmSvc",
"lfsvc",
"NcbService", "NcbService",
"SSDPSRV") "SSDPSRV")
Foreach ($service in $services) Foreach ($service in $services)
@ -228,9 +227,17 @@ IF (!(Test-Path $env:SystemDrive\Temp))
[Environment]::SetEnvironmentVariable("TEMP","$env:SystemDrive\Temp","User") [Environment]::SetEnvironmentVariable("TEMP","$env:SystemDrive\Temp","User")
[Environment]::SetEnvironmentVariable("TMP","$env:SystemDrive\Temp","Machine") [Environment]::SetEnvironmentVariable("TMP","$env:SystemDrive\Temp","Machine")
[Environment]::SetEnvironmentVariable("TEMP","$env:SystemDrive\Temp","Machine") [Environment]::SetEnvironmentVariable("TEMP","$env:SystemDrive\Temp","Machine")
# Удалить UWP-приложения, кроме Microsoft Store и Пакета локализованного интерфейса на русском # Удалить UWP-приложения, кроме UWP-панели Intel, Пакета локализованного интерфейса на русском, Наброска на фрагменте экрана, Панели управления NVidia и Microsoft Store
Get-AppxPackage -AllUsers | Where-Object {$_.Name -CNotLike "AppUp.IntelGraphicsControlPanel" -and $_.Name -CNotLike "Microsoft.LanguageExperiencePackru-ru" -and $_.Name -CNotLike "NVIDIACorp.NVIDIAControlPanel" -and $_.Name -CNotLike "*Store*"} | Remove-AppxPackage -ErrorAction SilentlyContinue $intel = "AppUp.IntelGraphicsControlPanel"
Get-AppxProvisionedPackage -Online | Where-Object {$_.DisplayName -CNotLike "AppUp.IntelGraphicsControlPanel" -and $_.DisplayName -CNotLike "NVIDIACorp.NVIDIAControlPanel" -and $_.DisplayName -CNotLike "*Store*"} | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue $language = "Microsoft.LanguageExperiencePackru-ru"
$sketch = "Microsoft.ScreenSketch"
$nvidia = "NVIDIACorp.NVIDIAControlPanel"
$store = "*Store*"
Get-AppxPackage -AllUsers | Where-Object {$_.Name -CNotLike $intel -and $_.Name -CNotLike $language -and $_.Name -CNotLike $sketch -and $_.Name -CNotLike $nvidia -and $_.Name -CNotLike $store} | Remove-AppxPackage -ErrorAction SilentlyContinue
$intel = "AppUp.IntelGraphicsControlPanel"
$nvidia = "NVIDIACorp.NVIDIAControlPanel"
$store = "*Store*"
Get-AppxProvisionedPackage -Online | Where-Object {$_.DisplayName -CNotLike $intel -and $_.DisplayName -CNotLike $nvidia -and $_.DisplayName -CNotLike $store} | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
# Отключить компоненты # Отключить компоненты
$features = @( $features = @(
# Отключить службу "Факсы и сканирование" # Отключить службу "Факсы и сканирование"
@ -829,4 +836,8 @@ IF ($Documents -ne "$drive\Документы")
KnownFolderPath -KnownFolder Documents -Path "$drive\Документы" KnownFolderPath -KnownFolder Documents -Path "$drive\Документы"
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{F42EE2D3-909F-4907-8871-4C22FC0BF756}" -Type ExpandString -Value "$drive\Документы" -Force New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{F42EE2D3-909F-4907-8871-4C22FC0BF756}" -Type ExpandString -Value "$drive\Документы" -Force
} }
# Разрешить приложениям доступ к вашему местоположению
New-ItemProperty -Path HKCU:Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location -Name Value -Type String -Value Deny -Force
# Выключить определение местоположения для этого устройства
New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location -Name Value -Type String -Value Deny -Force
Stop-Process -ProcessName explorer Stop-Process -ProcessName explorer

Loading…
Cancel
Save