FATAL: Cannot find subcommand for: 'winrm'


Whenever running the knife winrm commands through powershell . It is throwing error below

FATAL: Cannot find subcommand for: ‘winrm’.

Can anyone help me how to resolve it.


I’m assuming you are using the chef-dk. You want to make sure that your shell environment is configured to look for gems in the chef-dk’s ruby. You can do this by running chef shell-init powershell | Invoke-Expression and if you put that in your powershell $PROFILE then it will persist so you dont have to run it every time you open a powershell console.

1 Like

Thank you @Matt_Wrock. It is working fine . I have done my job .