WinRM Doesn't Search


#1

This page:
http://wiki.opscode.com/display/chef/Knife+Windows+Bootstrap

Says this:
The winrm subcommand allows you to invoke commands in parallel on a subset of the nodes in your infrastructure. The winrm subcommand uses the same syntax as the search subcommandhttp://wiki.opscode.com/display/chef/Search; you could could find the uptime of all your web servers using the command:
% knife winrm “role:web” “net stats srv” -m -x Administrator -P ‘super_secret_password’

But when I run this in dos:
C:\SVN\Core\tool-chef-repo>knife winrm “role:mobi.GIS” “ipconfig” -m -x [localadmin] -P [password]

I get this error:
ERROR: URI::InvalidURIError: the scheme http does not accept registry part: role:mobi.GIS:5985 (or bad hostname?)

But this command works:
C:\SVN\Core\tool-chef-repo>knife search node role:mobi.GIS

Any ideas why the winrm command for me is not searching like the search command?

Will


#2

I have already updated the wiki, which was incorrect. In the example below, you need to remove the -m and the search will work.

On Mar 30, 2012, at 5:30 AM, “Soula, William” <wsoula@mobicorp.commailto:wsoula@mobicorp.com> wrote:

This page:
http://wiki.opscode.com/display/chef/Knife+Windows+Bootstrap

Says this:
The winrm subcommand allows you to invoke commands in parallel on a subset of the nodes in your infrastructure. The winrm subcommand uses the same syntax as the search subcommandhttp://wiki.opscode.com/display/chef/Search; you could could find the uptime of all your web servers using the command:
% knife winrm “role:web” “net stats srv” -m -x Administrator -P ‘super_secret_password’

But when I run this in dos:
C:\SVN\Core\tool-chef-repo>knife winrm “role:mobi.GIS” “ipconfig” -m -x [localadmin] -P [password]

I get this error:
ERROR: URI::InvalidURIError: the scheme http does not accept registry part: role:mobi.GIS:5985 (or bad hostname?)

But this command works:
C:\SVN\Core\tool-chef-repo>knife search node role:mobi.GIS

Any ideas why the winrm command for me is not searching like the search command?

Will