Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timeout mechanism for individual commands #21

Closed
walter-1 opened this issue Dec 5, 2019 · 3 comments
Closed

Add timeout mechanism for individual commands #21

walter-1 opened this issue Dec 5, 2019 · 3 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@walter-1
Copy link

walter-1 commented Dec 5, 2019

To workaround: check REG setting first at the four script locations calling Get-NetAdapterStatistics

$AnyConnectKey = "HKLM:\SYSTEM\CurrentControlSet\Services\vpnagent"
if (-Not (Test-Path $AnyConnectKey))
{
if ($Global:noNetAdapters -ne $true) {
$file = "Get-NetAdapterStatistics.txt"
[String []] $cmds = "Get-NetAdapterStatistics -IncludeHidden | Sort-Object InterfaceDescription | Format-Table -Autosize | Out-String -Width $columns",
"Get-NetAdapterStatistics -IncludeHidden | Sort-Object InterfaceDescription | Format-Table -Property * -Autosize | Out-String -Width $columns"
ExecCommandsAsync -OutDir $dir -File $file -Commands $cmds
}
}

@tmolenh tmolenh added the bug Something isn't working label Dec 6, 2019
@tmolenh
Copy link
Contributor

tmolenh commented Dec 6, 2019

We probably need some timeout mechanism to prevent this and similar issues.

@walter-1
Copy link
Author

Info on root cause: the related LTE OS bug is here:
https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/27692990
Get-NetAdapterStatistics cmdlet causes infinite loop in WmiPrvSE.exe if the device has LTE (Wwan) modem.

@tmolenh tmolenh changed the title Get-NetAdapterStatistics hangs if Cisco AnyConnect is installed Add timeout mechanism for individual commands Oct 8, 2021
@tmolenh tmolenh added the enhancement New feature or request label Oct 8, 2021
@tmolenh
Copy link
Contributor

tmolenh commented May 28, 2022

Fixed, but with a global timeout instead: #61

@tmolenh tmolenh closed this as completed May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants