

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 Windows PowerShell 檔案
<a name="using-powershell-files-with-session-scripts"></a>

若要使用 Windows PowerShell 檔案，請在 **filename** 參數中指定 PowerShell 檔案的完整路徑：

```
"filename": 
"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
```

然後，在 **arguments** 參數中指定您的工作階段指令碼：

```
"arguments": "-File \"C:\\path\\to\\session\\script.ps1\"",
```

最後，確認 PowerShell 執行政策允許您的 PowerShell 檔案執行。