windows - Windows command prompt help in PowerShell
问题描述
This comes more or less from idle curiosity. I've been using DOS since the ear;y 80s, and before that CP/M-86. In the past several years, I've pretty much shifted to PowerShell. However, by habit of long standing, I still use the old DOS commands. In the Windows command prompt, I've been typing:
help dir
help dir > dirhelp.txt
help > doshelp.txt
Here's the question, and the answer most probably is, "No." Is there any PowerShell command (or cmd-let) that produces help for Windows commands?
Yeah, I know it's crazy, but inquiring minds want to know. 'gal' is the closest thing I use, but I miss the terse but useful DOS help.
解决方案
PowerShell 有一个非常好的帮助系统,可以通过几种不同的方式使用,我倾向于使用以下方法的组合:
获取所有 PowerShell cmdlet:
Get-Command
在帮助下查找所有 cmdlet:
Get-Command "*help*
查找有关特定 cmdlet 的帮助:
Get-Help Get-ChildItem
查找带有别名的 cmdlet:
Get-Alias
您甚至可以执行以下操作:
Get-Help Dir -Examples
或Get-Help Dir -Online
希望这可以帮助!
不错的文章,供进一步阅读:
https ://www.darkoperator.com/blog/2013/1/15/powershell-basicsusing-the-help-subsystem.html
推荐阅读
- java - Android Fragments 慢速切换 + 动画只工作一次 - 启动时
- html - 我怎样才能使这个图像居中?
- php - 我可以利用多线程 PHP 进行慢速 sql 查询吗
- css - 替换产品灯箱结果的自定义代码(每个产品都有单独的代码)
- python - 使用 SQLite3 将元组作为参数值传递的语法错误
- python - Fast api TestClient 发布文件列表
- spring - Spring Boot - 更新刷新令牌
- react-native - 使用伊斯坦布尔忽略导入的文件
- javascript - 如何在JS中将整数与字符串分开?
- laravel - Laravel 8 中间件 - 未定义的数组键 0