On *nix, using BASH (etc) you ask the system where a command is located (etc) by using the ‘type’ shell built-in like this:
$ type cat
cat is /bin/cat
Is there an equivalent of this ‘type’ command in Microsoft PowerShell 2.0 ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
An equivalent is
Get-Command.Windows 10 Update:
Since I’ve posted this answer, it appears that the behavior of
Get-Commandhas changed. To include all results (in the style of Un*x)type), now I need to pass the-Allflag, like so:As noted in a comment, this doesn’t include the
Definitioncolumn as was the previous behavior. I can’t determine a command-line argument to add the definition column, but as noted by @voutasaurus in the comment below, one can use:Version information for reference (I odn’t have the version information associated with the original answer text, but I’m guessing that it was Windows 7):