Skip to content

Commit 4edcb74

Browse files
committed
Adds job check loop sleep in VMSwitchPortMonitorMode.psm1
1 parent 328e22b commit 4edcb74

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

VMSwitchPortMonitorMode.psm1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ function CheckJob($out) {
6868
} else {
6969
throw $job.ErrorDescription
7070
}
71+
} else {
72+
Start-Sleep -Milliseconds 200
7173
}
7274
} while ($true)
7375
}
@@ -116,7 +118,7 @@ function Set-VMSwitchPortMonitorMode() {
116118
process {
117119
$epasds = GetSwitchEthernetPortAllocationSettingData $SwitchName $PortType
118120
if(!$epasds) {
119-
throw "Port for VMSwitch named ""$vswitchName"" not found"
121+
throw "Port for VMSwitch named ""$SwitchName"" not found"
120122
} else {
121123
foreach($epasd in $epasds) {
122124
$espssd = GetEthernetSwitchPortSecuritySettingData $epasd

0 commit comments

Comments
 (0)