1 回答
- 最新
- 投票最多
- 评论最多
0
Hello.
I thought it would be better to use SSM RunCommand instead of using Session Manager in this case.
https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html
If PowerShell is the target, I think it can be executed with AWS CLI using "AWS-RunPowerShellScript" as shown below.
aws ssm send-command --document-name "AWS-RunPowerShellScript" --document-version "1" --targets "Key=instanceids,Values=$instanceId" --parameters '{"commands":["Get-FileHash -Path $filePath -Algorithm SHA256"]}'
相关内容
- AWS 官方已更新 2 年前
- AWS 官方已更新 3 年前