如何创建Powershell脚本输出cmd让示例文件变成txt文件



我问了这个问题,并自己给出了答案。请参阅以下示例:

$filename = Read-Host -Prompt 'Input the Command you want examples for'
$pathloc = Read-Host -Prompt "Enter the path of where the example files will be stored"
get-help $filename -Examples | Out-File ($pathloc + $filename + ".txt")

最新更新