[Windows] Configure Windows settings,disable services and scheduled tasks (#5017)

* Configure Windows settings,disable services and scheduled tasks

* some settings are not available on Win16

* Add import New-ItemPath function

* Suppress output

* Disable Chrome and Edge tasks
This commit is contained in:
Aleksandr Chebotov
2022-02-08 17:09:32 +03:00
committed by GitHub
parent f160c496ff
commit cb8931646f
4 changed files with 137 additions and 3 deletions

View File

@@ -53,4 +53,5 @@ Export-ModuleMember -Function @(
'Get-VisualStudioInstance'
'Get-VisualStudioComponents'
'Get-WindowsUpdatesHistory'
'New-ItemPath'
)

View File

@@ -134,3 +134,13 @@ function Add-DefaultPathItem {
Set-DefaultPath -NewPath $newPath
Disconnect-Hive
}
function New-ItemPath {
param (
[string]$Path
)
if (-not (Test-Path $Path)) {
New-Item -Path $Path -Force -ErrorAction Ignore | Out-Null
}
}