Assuming you have a basic knowledge about Chef bootstrapping.
Windows instance bootstrapping requires the winrm enabled images. Either you can create such images and create instance using those image and bootstrap it or use --user-data option to configure winrm while ec2 server create in chef.
Using knife-ec2 chef plugin you can achieve creating windows instance and bootstraping it.
For this you just have to write a proper bash powershell script and reference the path of your script file in --user-date option.
You can use following script to enable winrm and add winrm listener and then use knife-ec2 server create command with --user-data option.
users_data.ps1
<powershell>
$user="<username>"
$password="<password>"
net user /add $user $password;
net localgroup Administrators /add $user;
winrm quickconfig -q
winrm create winrm/config/Listener?Address=*+Transport=HTTP
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" profile=public protocol=tcp localport=5985 remoteip=localsubnet new remoteip=any
</powershell>
And run following command to create ec2 instance.
bundle exec knife ec2 server create -N <node-name> -I <windows-image-id> -f m1.small -x <username> -P <password> --ssh-key <ssh-key-name> -c <path-to-knfie,rb> --bootstrap-protocol winrm --user-data 'C:\\users_data.ps1' -VV
users_data.ps1
<powershell>
$user="<username>"
$password="<password>"
$vm_name="<node-name>"
net user /add $user $password;
net localgroup Administrators /add $user;
winrm quickconfig -q
New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname $vm_name
$thumbprint = (Get-ChildItem -Path cert:\localmachine\my | Where-Object {$_.Subject -match "$vm_name"}).Thumbprint;
$create_listener_cmd = "winrm create winrm/config/Listener?Address=*+Transport=HTTPS '@{Hostname=`"$vm_name`";CertificateThumbprint=`"$thumbprint`"}'"
iex $create_listener_cmd
netsh advfirewall firewall add rule name="WinRM HTTPS" protocol=TCP dir=in Localport=5986 remoteport=any action=allow localip=any remoteip=any profile=public enable=yes
</powershell>