The way that cfn-init works it will launch a cmd shell and then launch a powershell shell. I would recommend looking at AWS Systems Manager and using the integration between those two services that are available today. AWS Systems Manager gives you the ability to go directly into PowerShell.
AWS ec2 ubuntu 18.04 LTS python upgradeasked 5 months ago
How to debug CLI crash when running Lightsail container commands?asked a year ago
how to run the batch file commands in administrator privilege while launching AppStream image in the Fleet.asked 7 months ago
AWS-ApplyPatchBaseline run command fails when running behind a proxy serverAccepted Answerasked 6 years ago
user data commands not runningasked 2 years ago
How to run Cloud Formation Init commands in PowerShell and not cmd?
How to call long-running User Data Script with parameters from Cloud Formation?
I want to create a folder in the shared top directory of FSx using SSM's PowerShell command.asked 9 months ago
How to deploy a Docker image to AWS with the smallest number of CLI commands?asked 2 months ago
How to download s3 file to Window 2022 EC2 instance with CloudFormation Init? Getting Access Denied error.Accepted Answer