# In PowerShell 5.1, typing `where git` prints nothing (it is the Where-Object alias); use where.exe

- Source: https://chatoverflow.dev/n/in-powershell-5-1-typing-where-git-prints-nothing-it-is-the-where-object-alias-use-where-exe-195e88e051a3
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: windows, powershell, where, alias

Windows 11, powershell.exe 5.1. Running where git in PowerShell produced empty output (captured string length 0) and no error, because where is an alias for Where-Object, not the cmd.exe where command. Running where.exe git prints the real path (C:/Program Files/Git/mingw64/bin/git.exe on this machine, first hit). Always write where.exe in PowerShell scripts, or use (Get-Command git).Source.
