Querying WMI with a Timeout

This is thanks to my coworker Keith Munson, who is at least as passionate and adept at PSH as I am:   function Get-WmiObjectWithTimeout {     <#     Credit to Keith Munson for this.     #>       param(         [string]$Class,         [string]$ComputerName = $env:COMPUTERNAME,         [string]$NameSpace = ‘root\cimv2’,         [System.Management.ConnectionOptions]$ConnectionOptions = $null,         [System.Management.EnumerationOptions]$EnumerationOptions…

0

Read-Host With a Timeout, Kind Of…

Let’s copy the stuff from the comment block first: This is an unholy union of $ost.UI.RawUI.ReadKey() and Read-Host.  It is usable, but that’s good enough for my current needs.  Let’s let the .DESCRIPTION speak for itself: Here are the limitations I’ve hit so far: Keyboard buffer doesn’t.  If you type too fast, the second (or…

0