August 13th, 2015

PowerTip: Find Automatic Variables that Begin with Letter

Doctor Scripto
Scripter

Summary: Find automatic variables in Windows PowerShell that begin with a specific letter.

Hey, Scripting Guy! Question How can I find automatic variables in Windows PowerShell that begin with the letter P?

Hey, Scripting Guy! Answer Use the drive Windows PowerShell variable provider with a wildcard character after the letter P:

DIR variable:P*

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.