简体   繁体   English

如何运行与 PowerShell 别名同名的命令?

[英]How to run a command with the same name as a PowerShell alias?

I have a few command line utilities that have the same name as PowerShell aliases.我有一些与 PowerShell 别名同名的命令行实用程序。 For example where (alias for Where-Object ) shadows the where tool that comes with Windows.例如whereWhere-Object的别名)会影响 Windows 附带的where工具。

In bash I can skip aliases using \ or command like \where or command where .在 bash 中,我可以使用\command (如\wherecommand where )跳过别名。 Is there something similar in PowerShell? PowerShell 中是否有类似的东西?

You can add the extension when invoking:您可以在调用时添加扩展:

& where.exe "arguments"

Or specify the full path.或指定完整路径。

See About_Command_Precedence请参见About_Command_Precedence

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM