Closed Vinoth-Chef closed 7 years ago
when we use below remote execution, it throws error if password has $ symbol in it.
knife winrm --winrm-shell elevated NODE_NAME "chef-client -c c:/chef/client.rb" -m -x "user" -P "password"
solution:
if we use
$password = "<%= password %>" instead of $password = '<%= password %>' in line 2 in below script it will be fixed.
https://github.com/WinRb/winrm-elevated/blob/master/lib/winrm-elevated/scripts/elevated_shell.ps1
Please include this fix in next release it will help someone.
Thanks, Vinoth
I'm assuming you mean $password = '<%= password %>' instead of $password = "<%= password %>" correct? Would you like to submit a PR with this change and I'll gladly merge.
$password = '<%= password %>' instead of $password = "<%= password %>"
when we use below remote execution, it throws error if password has $ symbol in it.
knife winrm --winrm-shell elevated NODE_NAME "chef-client -c c:/chef/client.rb" -m -x "user" -P "password"
solution:
if we use
$password = "<%= password %>" instead of $password = '<%= password %>' in line 2 in below script it will be fixed.
https://github.com/WinRb/winrm-elevated/blob/master/lib/winrm-elevated/scripts/elevated_shell.ps1
Please include this fix in next release it will help someone.
Thanks, Vinoth