powershell/PSAvoidUsingWMICmdlet is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.
Description
As of PowerShell 3.0, the CIM cmdlets should be used over the WMI cmdlets. The following cmdlets should not be used:Get-WmiObjectRemove-WmiObjectInvoke-WmiMethodRegister-WmiEventSet-WmiInstance
Get-CimInstanceRemove-CimInstanceInvoke-CimMethodRegister-CimIndicationEventSet-CimInstance
How
Change to the equivalent CIM-based cmdlet.Get-WmiObject->Get-CimInstanceRemove-WmiObject->Remove-CimInstanceInvoke-WmiMethod->Invoke-CimMethodRegister-WmiEvent->Register-CimIndicationEventSet-WmiInstance->Set-CimInstance