0

Whenever I use Powershell, I have access to commands like npm, npx, git, etc. Is there a way that I can easily list all of those available commands that I have added through my environment variable PATH? I've tried using Get-Variable and Get-Command without luck of finding git and all my environment variable commands.

2 Answers 2

3

Use a Regular Expression on the output of Get-Command:

Get-Command -Type Application | Where Name -Match 'git|npm|npx'
Sign up to request clarification or add additional context in comments.

1 Comment

Oh wow. I was really looking for Get-Command -Type Application, but this is even better. Thanks!
0

Just do this:

Set-Location Env:
Get-ChildItem

EDIT: In More detail: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-5.1

1 Comment

I tried, but after doing "Get-ChildItem | grep git/npm/npx" I can't find the commands. I do see the key/value pair of my environment variables from doing your command(s) though.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.