我问了这个,然后自己想出了答案。请参阅以下示例:
答案 0 :(得分:-1)
$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")