mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #39830 from thaJeztah/fix_rs1_NdisAdapters_leak
windows.ps1: fix leaked NdisAdapters not being cleaned up on RS1
This commit is contained in:
commit
b608ae379a
1 changed files with 4 additions and 12 deletions
|
@ -203,12 +203,8 @@ Function Nuke-Everything {
|
||||||
$count=(Get-ChildItem $reg | Measure-Object).Count
|
$count=(Get-ChildItem $reg | Measure-Object).Count
|
||||||
if ($count -gt 0) {
|
if ($count -gt 0) {
|
||||||
Write-Warning "There are $count NdisAdapters leaked under Psched\Parameters"
|
Write-Warning "There are $count NdisAdapters leaked under Psched\Parameters"
|
||||||
if ($env:COMPUTERNAME -match "jenkins-rs1-") {
|
Write-Warning "Cleaning Psched..."
|
||||||
Write-Warning "Cleaning Psched..."
|
Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
|
||||||
Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
|
|
||||||
} else {
|
|
||||||
Write-Warning "Not cleaning as not a production RS1 server"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: This should be able to be removed in August 2017 update. Only needed for RS1
|
# TODO: This should be able to be removed in August 2017 update. Only needed for RS1
|
||||||
|
@ -216,12 +212,8 @@ Function Nuke-Everything {
|
||||||
$count=(Get-ChildItem $reg | Measure-Object).Count
|
$count=(Get-ChildItem $reg | Measure-Object).Count
|
||||||
if ($count -gt 0) {
|
if ($count -gt 0) {
|
||||||
Write-Warning "There are $count NdisAdapters leaked under WFPLWFS\Parameters"
|
Write-Warning "There are $count NdisAdapters leaked under WFPLWFS\Parameters"
|
||||||
if ($env:COMPUTERNAME -match "jenkins-rs1-") {
|
Write-Warning "Cleaning WFPLWFS..."
|
||||||
Write-Warning "Cleaning WFPLWFS..."
|
Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
|
||||||
Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
|
|
||||||
} else {
|
|
||||||
Write-Warning "Not cleaning as not a production RS1 server"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
# Don't throw any errors onwards Throw $_
|
# Don't throw any errors onwards Throw $_
|
||||||
|
|
Loading…
Reference in a new issue