我问了这个问题,并自己给出了答案。请参阅以下示例:
$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")