- Más nuevo
- Más votos
- Más comentarios
wow, the problem was that the "U" in Uninstall was not capitalized. I took the string directly from the console so either it provided the lowercase or I retyped Uninstall without the capital...sorry
Hello,
Thank you so much for your rePost question, my name is RJ an engineer and I will be assisting with your inquiry today.
From the provided snippet, it looks like the parameters for the document are being passed with PowerShell's splatting. However, the parameters
parameter is expecting a datatype of <hashtable>.
Original:
Send-SSMCommand 'AWS-ConfigureAWSPackage' -parameters @HashTableOfPackageNameActionInstallType
Proposed:
Send-SSMCommand 'AWS-ConfigureAWSPackage' -parameters $HashTableOfPackageNameActionInstallType
References
- [Send-SSMCommand Cmdlet][ssm] [ssm]:https://docs.aws.amazon.com/powershell/latest/reference/items/Send-SSMCommand.html
RJ, thank you for the reply, I should have provided some more info, I have already cast the variable as a hashtable and am actually doing this:
(the parameter string is stolen directly from the SSM run command UI at the bottom of the runcommand page when you select your options so you can run it via aws cli, I just stole the parameter argument)
$params = '{"action":["uninstall"],"installatinType":[Uninstall and reinstall"],"version":[""],"additionalArguments":[""],"name":["AmazonCloudWatchAgent"]}' | convertfrom-json -ashashtable Send-SSMCommand -DocumentName 'AWS-ConfigureAWSPackage' -InstanceID $ID -Parameter $params -region us-west-2
The error is not that the variable is improperly formed , rather that 'Send-SSMCommand: document AWS-ConfigureAWSPackage does not support parameters. ' I think it is a bug with the cmdlet? Can you try running it? I am guessing that the cmdlet needs updated and is not passsing the flags correctly to the aws api for the document., the awscli must be correctly passing them.
Contenido relevante
- OFICIAL DE AWSActualizada hace un año
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 8 meses
Could you please provide the exact code snippet you are using to call the commandlet? Sometimes this error message means there is just an issue with the provided parameters block itself, e.g. a typo or wrong formatting.