Notatka
Dostęp do tej strony wymaga autoryzacji. Może spróbować zalogować się lub zmienić katalogi.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
poziom ważności: ostrzeżenie
Description
Ta reguła wykrywa użycie cmdletów Windows Management Instrumentation (WMI). Od PowerShell 3.0 powinieneś używać cmdletów Common Information Model (CIM) zamiast cmdletów WMI. CMDLETS CIM są zgodne ze standardami WS-Management (WSMan) oraz standardem CIM, który umożliwia zarządzanie systemami operacyjnymi Windows i nie-Windows.
Nie używaj tych cmdletów WMI:
Get-WmiObjectRemove-WmiObjectInvoke-WmiMethodRegister-WmiEventSet-WmiInstance
Zamiast tego użyj tych cmdletów CIM:
Get-CimInstanceRemove-CimInstanceInvoke-CimMethodRegister-CimIndicationEventSet-CimInstance
Example
Niezgodne
Get-WmiObject -Query 'Select * from Win32_Process where name LIKE "myprocess%"' | Remove-WmiObject
Invoke-WmiMethod -Class Win32_Process -Name 'Create' -ArgumentList @{ CommandLine = 'notepad.exe' }
Zgodne
Get-CimInstance -Query 'Select * from Win32_Process where name LIKE "myprocess%"' | Remove-CimInstance
Invoke-CimMethod -ClassName Win32_Process -MethodName 'Create' -Arguments @{ CommandLine = 'notepad.exe' }