Command Precedence in Powershell

PowerShell uses the following precedence rules when it runs commands for all items loaded in the current session:

Powershell decides what to run based on this order of precedence:

THEREFORE, if you type 'doit' at a prompt in powershell, it will look for:

...and it will stop looking and run the first one it finds.

See also