Sean's Personal Code Samples And References

The * wildcard will match zero or more characters

The ? wildcard will match a single character

[m-n] Match a range of characters from m to n, so [f-m]ake will match fake/jake/make

[abc] Match a set of characters a,b,c.., so [fm]ake will match fake/make

Powershell wildcards are consistent in their meaning so using *.* will match any characters followed by a period (.) followed by any characters. In other words *.* will return only files that have an extension, not directories. To return all items just use a single * 
This is quite different to the behaviour seen under the CMD shell.

When using WMI filters use the WMI specific wildcards: % for zero or more characters, _ for a single character.


PS C:\>Get-ChildItem c:\work\*.xls

PS C:\>Get-ChildItem c:\work\[a-f]*.txt
Sean Marcellus
There are 10 kinds of people e in this world, those who understand binary and those who don’t.