Skip to content

Commit f3b55e6

Browse files
committed
Rule Documentation for WMI Cmdlet
1 parent 974a255 commit f3b55e6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#AvoidAlias
2+
**Severity Level: Warning**
3+
4+
5+
##Description
6+
7+
An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability.
8+
9+
##How to Fix
10+
11+
Please consider using full cmdlet name instead of alias.
12+
13+
##Example
14+
15+
Wrong: gps | Where-Object {$_.WorkingSet -gt 20000000}
16+
17+
Correct: Get-Process | Where-Object {$_.WorkingSet -gt 20000000}

0 commit comments

Comments
 (0)