[RESOLVED] Knife bootstrap Windows 2012

bootstrap Windows 2012r2 VM

bootstrap command : knife bootstrap windows winrm --winrm-transport ssl --winrm-user inmbzic\admin --winrm-password Welcome1@ --winrm-ssl-verify-mode verify_none
Error : SSL validation of HTTPS requests for the WinRM transport is disabled. HTTPS WinRM
connections are still encrypted, but knife is not able to detect forged replies
or spoofing attacks.

#Verify all WinRM HTTPS connections (default, recommended)
knife[:winrm_ssl_verify_mode] = :verify_peer
Have added in knife.rb not sure its an right method

Please advice

root@iabcedf:~/chef/chef-repo# knife wsman test -m
Connected successfully to at
root@iabcdef:~/chef/chef-repo# knife wsman test -m --winrm-transport ssl
WARNING: Failed to connect to at
ERROR: Failed to connect to 1 nodes.

I fixed the error by enabling
Enable-PSRemoting -force
Set-Item WSMan:\localhost\MaxTimeoutms 1800000
Set-Item WSMan:\localhost\Service\AllowRemoteAccess $true
Set-Item WSMan:\localhost\Service\Auth\Basic $true
Set-item WSMan:\localhost\Service\AllowUnencrypted $true