Skip to content

Instantly share code, notes, and snippets.

@obazoud
Created February 28, 2014 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save obazoud/9275067 to your computer and use it in GitHub Desktop.
Save obazoud/9275067 to your computer and use it in GitHub Desktop.
WinRm tests
require 'winrm'
endpoint = 'http://xxxx:5985/wsman'
winrm = WinRM::WinRMWebService.new(endpoint, :plaintext, :user => 'Administrator', :pass => 'xxxx', :disable_sspi => true)
winrm.cmd('ipconfig /all') do |stdout, stderr|
  STDOUT.print stdout
  STDERR.print stderr
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment