mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 02:18:40 +08:00
[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:
committed by
GitHub
parent
f160c496ff
commit
cb8931646f
@@ -53,4 +53,5 @@ Export-ModuleMember -Function @(
|
||||
'Get-VisualStudioInstance'
|
||||
'Get-VisualStudioComponents'
|
||||
'Get-WindowsUpdatesHistory'
|
||||
'New-ItemPath'
|
||||
)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user