使用 Windows PowerShell 文件 - Amazon AppStream 2.0

使用 Windows PowerShell 文件

要使用 Windows PowerShell 文件,请在 filename 参数中指定 PowerShell 文件的完整路径:

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

然后,在 arguments 参数中指定您的会话脚本:

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

最后,验证 PowerShell 执行策略是否允许运行 PowerShell 文件。