PowerShell v6.2包含许多实验×××,包括PSCommandNotFoundSuggestion,启用该功能后,如果命令输入错误,则PS会有针对性的给出建议。
使用
Enable-ExperimentalFeature -Name PSCommandNotFoundSuggestion
启用该功能。然后重新启动PowerShell。
启用后的效果如下
PS> Get-Srvice
Suggestion [4,General]: The most similar commands are: Get-Service, Set-Service, New-Service, Get-PSDrive.
I expected Get-Service so that worked
更多信息,您也可以参考如下的微信公众号
转载于:https://blog.51cto.com/543925535/2378059