PowerShell高效使用技巧与脚本应用指南
1. 学习常用命令别名
在交互式使用PowerShell时,完整的cmdlet名称(如 Get-ChildItem )输入起来繁琐又缓慢。虽然别名更高效,但发现它们需要一些时间。为了更轻松地学习别名,可以按以下两个步骤修改提示信息,以提醒你使用的别名命令的简短版本:
1. 将 Get-AliasSuggestion.ps1 程序添加到工具目录或其他目录。以下是 Get-AliasSuggestion.ps1 的代码:
##############################################################################
##
## Get-AliasSuggestion
##
## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)
##
##############################################################################
<#
.SYNOPSIS
Get an alias suggestion from the full text of the last command. Intended to
be added to your prompt function to help learn aliases for comm
超级会员免费看
订阅专栏 解锁全文
150

被折叠的 条评论
为什么被折叠?



