Add OperationTimeout configuration for CIM
Summary of new feature
- If the default CIM timeout on a server is set to indefinite when
get-dbaCmObjectqueries a server that is hung or has a corrupted WMI thenget-dbaCmObjectnever completes. To overcome the problem "OperationTimeoutSec" could be introduced as a dbaToolsConfig setting in the computer management section and then applied to CIM connection to prevent the hang.
Proposed technical details (if applicable)
How to avoid wmi query hangs in Powershell
Thread where i discussed issue in slack
Latest version of dbatools as of writing
- 1.0.107
🚧🚨 This issue is being marked as stale due to 90 days of inactivity. If you would like this issue to remain open:
- Verify the issue/bug is reproduced in the latest version of the module
- Verify the environmental info provided is still accurate
- Add any additional steps you followed to reproduce if necessary 🚨🚧 ⌛️ This issue will be closed in 30 days ⌛️
@ClaudioESSilva Can you please have a look at this and suggest a name for the config parameter? @FriedrichWeinmann / @wsmelton / @jpomfret : I'm not a CIM or WMI expert, so please review this if you are. And have a look at the linked issue that was closed by the stale bot - Do we have an issue with having WMI as fallback of CIM?
Hi @potatoqualitee - can you have a look? Thanks.
Sounds good. Should we add a sane default?
I would take 60 seconds as the default.
Does anyone know how to implement this?
As I don't have an environment to test this and not enough knowlegde to implement it, I will step back and de-assign myself.