Skip to content

Commit 5e7d2f6

Browse files
committed
Update AvoidUsingWMICmdlet.md
Added quotes for code
1 parent 6f2a57b commit 5e7d2f6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

RuleDocumentation/AvoidUsingWMICmdlet.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ Use corresponding CIM cmdlets such as Get-CIMInstance, Remove-CIMInstance, Invok
1515
##Example
1616

1717
Wrong:
18+
```
1819
Get-WmiObject -Query 'Select * from Win32_Process where name LIKE "myprocess%"' | Remove-WmiObject
1920
Invoke-WmiMethod –Class Win32_Process –Name "Create" –ArgumentList @{ CommandLine = "notepad.exe" }
20-
21+
```
2122
Correct:
23+
```
2224
Get-CimInstance -Query 'Select * from Win32_Process where name LIKE "myprocess%"' | Remove-CIMInstance
2325
Invoke-CimMethod –ClassName Win32_Process –MethodName "Create" –Arguments @{ CommandLine = "notepad.exe" }
26+
```

0 commit comments

Comments
 (0)