How to - Execute command on remote Windows machine?

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

How to - Execute command on remote Windows machine?

John Smithman
Could somebody explain to me how would I go about sending a command from my Linux server with openwsman installed to a remote Windows server using WinRM? Can you provide an example? The winrm command does not work? All I am looking to do is send a command to a remote Windows machine and have it execute like "ipconfig" or maybe even open an interactive shell?

Also I installed the openwsman-server rpm from yum, is that correct?

Thanks,

John-

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

Bai, Bin (ESSN-MCXS-CN)

Hi John

 

I don’t know what “winrm” is, but from the Google, it’s a tool that could accept request over SOAP from remote side, and implement IPMI on the local machine, is that right?

If this is right, I think you still need a CIMOM system on your Windows environment. I think openwsman is designed to work with CIMOM, (CIMOM, for example is tog-pegasus, or SFCB), and CIMOM will get data from the providers that registered to it. The provider is used to collect information that you need, for example the output of “ipconfig “

This is as far as I know, maybe not right.

 

 

Regards,

Bai, Bin

 

 

 

From: John Smithman [mailto:[hidden email]]
Sent: Friday, August 30, 2013 8:57 AM
To: [hidden email]
Subject: [Openwsman-devel] How to - Execute command on remote Windows machine?

 

Could somebody explain to me how would I go about sending a command from my Linux server with openwsman installed to a remote Windows server using WinRM? Can you provide an example? The winrm command does not work? All I am looking to do is send a command to a remote Windows machine and have it execute like "ipconfig" or maybe even open an interactive shell?

 

Also I installed the openwsman-server rpm from yum, is that correct?

 

Thanks,

 

John-


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

Klaus Kaempf
In reply to this post by John Smithman
* John Smithman <[hidden email]> [Aug 30. 2013 02:57]:
> Could somebody explain to me how would I go about sending a command from my Linux server with openwsman installed to a remote
> Windows server using WinRM?

The WinRS (Windows Remote Shell) protocol is somewhat complex as it
involves multiple SOAP requests for a single remote command.

There is a WinRS implementation as part of the Openwsman Ruby bindings
at
https://github.com/Openwsman/openwsman/blob/master/bindings/ruby/tests/winrs.rb

(You need to compile Openwsman from latest source for this !)

Then you can run it like this:

  ruby winrs.rb -u <user> -p <password> -h <host> ipconfig

(Assuming that the Windows host listens for http connections on port
5985, accepting basic authentication)

Hth,
Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

John Smithman
Klaus,

When I try install the latest version I get the following output even after installing the latest SWIG -

WARNING libpam not found, disabling PAM authentication
-- Building Ruby bindings
-- ************  WARNING  *************
-- Didn't Find Ruby Headers...
-- BUILD_RUBY explicitly requested.
-- Make sure Ruby header files are available and run cmake again.
-- ************************************
-- Building Python bindings
-- Found PythonLibs...
-- Building Python...
-- Building Perl bindings
-- Building Java bindings
-- Command "/usr/bin/swig -swiglib" failed with output:

-- SWIG was not found. Please specify Swig executable location
CMake Error at CMakeLists.txt:242 (MESSAGE):
  Found SWIG version 1.3.40, please upgrade SWIG to 2.0.5 or later


From: Klaus Kaempf <[hidden email]>
To: John Smithman <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Friday, August 30, 2013 3:54 AM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

* John Smithman <[hidden email]> [Aug 30. 2013 02:57]:
> Could somebody explain to me how would I go about sending a command from my Linux server with openwsman installed to a remote
> Windows server using WinRM?

The WinRS (Windows Remote Shell) protocol is somewhat complex as it
involves multiple SOAP requests for a single remote command.

There is a WinRS implementation as part of the Openwsman Ruby bindings
at
https://github.com/Openwsman/openwsman/blob/master/bindings/ruby/tests/winrs.rb

(You need to compile Openwsman from latest source for this !)

Then you can run it like this:

  ruby winrs.rb -u <user> -p <password> -h <host> ipconfig

(Assuming that the Windows host listens for http connections on port
5985, accepting basic authentication)

Hth,
Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

John Smithman
Klaus,

I tried to use OpenSUSE to build the latest openwsman and it says it can't find Ruby, OpenSSL, Python, and a bunch of other errors.

John-


From: John Smithman <[hidden email]>
To: Klaus Kaempf <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Friday, August 30, 2013 9:59 PM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

Klaus,

When I try install the latest version I get the following output even after installing the latest SWIG -

WARNING libpam not found, disabling PAM authentication
-- Building Ruby bindings
-- ************  WARNING  *************
-- Didn't Find Ruby Headers...
-- BUILD_RUBY explicitly requested.
-- Make sure Ruby header files are available and run cmake again.
-- ************************************
-- Building Python bindings
-- Found PythonLibs...
-- Building Python...
-- Building Perl bindings
-- Building Java bindings
-- Command "/usr/bin/swig -swiglib" failed with output:

-- SWIG was not found. Please specify Swig executable location
CMake Error at CMakeLists.txt:242 (MESSAGE):
  Found SWIG version 1.3.40, please upgrade SWIG to 2.0.5 or later


From: Klaus Kaempf <[hidden email]>
To: John Smithman <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Friday, August 30, 2013 3:54 AM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

* John Smithman <[hidden email]> [Aug 30. 2013 02:57]:
> Could somebody explain to me how would I go about sending a command from my Linux server with openwsman installed to a remote
> Windows server using WinRM?

The WinRS (Windows Remote Shell) protocol is somewhat complex as it
involves multiple SOAP requests for a single remote command.

There is a WinRS implementation as part of the Openwsman Ruby bindings
at
https://github.com/Openwsman/openwsman/blob/master/bindings/ruby/tests/winrs.rb

(You need to compile Openwsman from latest source for this !)

Then you can run it like this:

  ruby winrs.rb -u <user> -p <password> -h <host> ipconfig

(Assuming that the Windows host listens for http connections on port
5985, accepting basic authentication)

Hth,
Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

John Smithman
Here is what i get on OpenSUSE.


linux-brhf:/tmp/openwsman-master # cmake -DCMAKE_INSTALL_PREFIX=/usr
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Version 2.4.0
-- Package Version "2.4"
-- Plugin API Version "2.2"
-- Package build timestamp 201309010001
-- Building for x86_64
-- Libraries will be installed in /usr/lib64
-- Configuration will be installed in /etc/openwsman
CMake Warning at CMakeLists.txt:146 (MESSAGE):
   libpam not found, disabling PAM authentication


-- Building Ruby bindings
-- Building Python bindings
-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
-- ************  WARNING  *************
-- Didn't Find Python Headers...
-- BUILD_PYTHON explicitly requested.
-- Make sure Python header files are available and run cmake again.
-- ************************************
-- Building Perl bindings
-- Found Java: /usr/lib64/jvm/jre/bin/java (found version "1.7.0.40")
-- Could NOT find JNI (missing:  JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
CMake Warning at CMakeLists.txt:219 (MESSAGE):
   Java jni.h not found


-- SWIG 2.0.9 found at /usr/bin/swig
-- Python executable:
-- Python lib dir:
CMake Error at bindings/python/CMakeLists.txt:46 (INSTALL):
  install TARGETS given no LIBRARY DESTINATION for shared library target
  "pywsman".


CMake Error at bindings/python/CMakeLists.txt:47 (INSTALL):
  install FILES given no DESTINATION!


-- Ruby executable: /usr/bin/ruby
-- Ruby dir: /usr/lib64/ruby/vendor_ruby/1.9.1
-- Ruby arch dir: /usr/lib64/ruby/vendor_ruby/1.9.1/x86_64-linux
-- Ruby include path: /usr/include/ruby-1.9.1
-- Perl executable: /usr/bin/perl
-- Perl core dir: /usr/lib/perl5/5.16.2/x86_64-linux-thread-multi/CORE
-- Perl vendor arch dir: /usr/lib/perl5/vendor_perl/5.16.2/x86_64-linux-thread-multi
-- Perl vendor lib dir: /usr/lib/perl5/vendor_perl/5.16.2
-- Could NOT find CURL (missing:  CURL_LIBRARY CURL_INCLUDE_DIR)
CMake Error at CMakeLists.txt:266 (MESSAGE):
   curl not found


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /tmp/openwsman-master/bindings/python

-- Configuring incomplete, errors occurred!


From: John Smithman <[hidden email]>
To: John Smithman <[hidden email]>; Klaus Kaempf <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Saturday, August 31, 2013 11:50 PM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

Klaus,

I tried to use OpenSUSE to build the latest openwsman and it says it can't find Ruby, OpenSSL, Python, and a bunch of other errors.

John-


From: John Smithman <[hidden email]>
To: Klaus Kaempf <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Friday, August 30, 2013 9:59 PM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

Klaus,

When I try install the latest version I get the following output even after installing the latest SWIG -

WARNING libpam not found, disabling PAM authentication
-- Building Ruby bindings
-- ************  WARNING  *************
-- Didn't Find Ruby Headers...
-- BUILD_RUBY explicitly requested.
-- Make sure Ruby header files are available and run cmake again.
-- ************************************
-- Building Python bindings
-- Found PythonLibs...
-- Building Python...
-- Building Perl bindings
-- Building Java bindings
-- Command "/usr/bin/swig -swiglib" failed with output:

-- SWIG was not found. Please specify Swig executable location
CMake Error at CMakeLists.txt:242 (MESSAGE):
  Found SWIG version 1.3.40, please upgrade SWIG to 2.0.5 or later


From: Klaus Kaempf <[hidden email]>
To: John Smithman <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Friday, August 30, 2013 3:54 AM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

* John Smithman <[hidden email]> [Aug 30. 2013 02:57]:
> Could somebody explain to me how would I go about sending a command from my Linux server with openwsman installed to a remote
> Windows server using WinRM?

The WinRS (Windows Remote Shell) protocol is somewhat complex as it
involves multiple SOAP requests for a single remote command.

There is a WinRS implementation as part of the Openwsman Ruby bindings
at
https://github.com/Openwsman/openwsman/blob/master/bindings/ruby/tests/winrs.rb

(You need to compile Openwsman from latest source for this !)

Then you can run it like this:

  ruby winrs.rb -u <user> -p <password> -h <host> ipconfig

(Assuming that the Windows host listens for http connections on port
5985, accepting basic authentication)

Hth,
Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel





------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

Klaus Kaempf
* John Smithman <[hidden email]> [Sep 01. 2013 06:05]:
> Here is what i get on OpenSUSE.

You need to install a couple of development packages:
- pam-devel
- gcc-c++
- curl-devel
- libxml2-devel
- sblim-sfcc-devel
- openssl-devel
- pkg-config

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

John Smithman
Klaus,

here is what I get now. It now seems to finish but warns you about the errors-




-- Configuration will be installed in /etc/openwsman
-- building PAM authentication
-- Building Ruby bindings
-- ************  WARNING  *************
-- Didn't Find Ruby Headers...
-- BUILD_RUBY explicitly requested.
-- Make sure Ruby header files are available and run cmake again.
-- ************************************
-- Building Python bindings
-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
-- ************  WARNING  *************
-- Didn't Find Python Headers...
-- BUILD_PYTHON explicitly requested.
-- Make sure Python header files are available and run cmake again.
-- ************************************
-- Found Perl: /usr/bin/perl (found version "5.16.2")
-- Building Perl bindings
-- Could NOT find Java (missing:  Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE) (found version "1.7.0.15")
CMake Warning at CMakeLists.txt:223 (MESSAGE):
   Java compiler not found


-- Could NOT find SWIG (missing:  SWIG_EXECUTABLE SWIG_DIR)
-- SWIG not found, skipping bindings and swig server plugin.
FATALCannot build SWIG server plugin
ERRORCannot build client bindings
-- Found CURL: /usr/lib64/libcurl.so (found version "7.28.1")
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.0")
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found




From: Klaus Kaempf <[hidden email]>
To: John Smithman <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Tuesday, September 3, 2013 9:57 AM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

* John Smithman <[hidden email]> [Sep 01. 2013 06:05]:
> Here is what i get on OpenSUSE.

You need to install a couple of development packages:
- pam-devel
- gcc-c++
- curl-devel
- libxml2-devel
- sblim-sfcc-devel
- openssl-devel
- pkg-config

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

John Smithman
Klaus, I got cmake to work with everything but Java.

-- Could NOT find JNI (missing:  JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
CMake Warning at CMakeLists.txt:219 (MESSAGE):
   Java jni.h not found


I went ahead and did the make and this is what happens.


Linking C shared library _openwsman.so
[ 40%] Built target rbwsman
Scanning dependencies of target ruby_gem
[ 40%] Generating ext
[ 41%] Generating html
Creating rdoc documentation .../usr/lib64/ruby/1.9.1/rdoc.rb:101:in `const_missing': uninitialized constant RDoc::Generator (NameError)
    from /usr/lib64/ruby/gems/1.9.1/gems/rdoc-3.12/lib/rdoc/generator/markup.rb:8:in `<top (required)>'
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /usr/lib64/ruby/gems/1.9.1/gems/rdoc-3.12/lib/rdoc/generator/darkfish.rb:6:in `<top (required)>'
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /usr/lib64/ruby/gems/1.9.1/gems/rdoc-3.12/lib/rdoc/rdoc.rb:530:in `<top (required)>'
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /tmp/openwsman-master/bindings/ruby/rdoc.rb:16:in `<top (required)>'
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /tmp/openwsman-master/bindings/ruby/rdoc1.9:11:in `<main>'
make[2]: *** [bindings/ruby/html] Error 1
make[1]: *** [bindings/ruby/CMakeFiles/ruby_gem.dir/all] Error 2
make: *** [all] Error 2




From: John Smithman <[hidden email]>
To: Klaus Kaempf <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Tuesday, September 3, 2013 9:59 PM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

Klaus,

here is what I get now. It now seems to finish but warns you about the errors-




-- Configuration will be installed in /etc/openwsman
-- building PAM authentication
-- Building Ruby bindings
-- ************  WARNING  *************
-- Didn't Find Ruby Headers...
-- BUILD_RUBY explicitly requested.
-- Make sure Ruby header files are available and run cmake again.
-- ************************************
-- Building Python bindings
-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
-- ************  WARNING  *************
-- Didn't Find Python Headers...
-- BUILD_PYTHON explicitly requested.
-- Make sure Python header files are available and run cmake again.
-- ************************************
-- Found Perl: /usr/bin/perl (found version "5.16.2")
-- Building Perl bindings
-- Could NOT find Java (missing:  Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE) (found version "1.7.0.15")
CMake Warning at CMakeLists.txt:223 (MESSAGE):
   Java compiler not found


-- Could NOT find SWIG (missing:  SWIG_EXECUTABLE SWIG_DIR)
-- SWIG not found, skipping bindings and swig server plugin.
FATALCannot build SWIG server plugin
ERRORCannot build client bindings
-- Found CURL: /usr/lib64/libcurl.so (found version "7.28.1")
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.0")
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found




From: Klaus Kaempf <[hidden email]>
To: John Smithman <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Tuesday, September 3, 2013 9:57 AM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

* John Smithman <[hidden email]> [Sep 01. 2013 06:05]:
> Here is what i get on OpenSUSE.

You need to install a couple of development packages:
- pam-devel
- gcc-c++
- curl-devel
- libxml2-devel
- sblim-sfcc-devel
- openssl-devel
- pkg-config

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

Klaus Kaempf
In reply to this post by John Smithman
* John Smithman <[hidden email]> [Sep 04. 2013 03:59]:
> Klaus,
>
> here is what I get now. It now seems to finish but warns you about the errors-

No worries about the errors, it's only the client java bindings which
won't be build.

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

Klaus Kaempf
In reply to this post by John Smithman
* John Smithman <[hidden email]> [Sep 04. 2013 04:53]:
> Klaus, I got cmake to work with everything but Java.
>
> -- Could NOT find JNI (missing:  JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
> CMake Warning at CMakeLists.txt:219 (MESSAGE):
>    Java jni.h not found

Run cmake with -DBUILD_JAVA=NO, this should disable Java.

>
>
> I went ahead and did the make and this is what happens.
>

Hmm, on my openSUSE 12.3 system, rdoc is bundled with Ruby. You have
rdoc in rubygems, which is external from core Ruby. Try to uninstall
rubygem-rdoc and try again.


Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

John Smithman
Klaus, doing both finally let me make and make install. Thanks.

Now I have run into trouble with the WinRM part.

So i downloaded winrs.rb to /tmp and try to run the command from what you said and following the output options and I get an error about not being able to resolve the hostname. I am not sure if I am executing winrs.rb from the correct directory, does it need to be placed in one of the wsman folders?

linux-67sd:/tmp # ruby winrs.rb -h 192.168.1.21 -u Administrator -p secret ipconfig
Client connection to http://Administrator:secret@192.168.1.21:5985/wsman failed with 6, Fault: Couldn't resolve host name
linux-67sd:/tmp #

winrm is running fine on the target Windows machine and I tested it by connecting from another Windows client over winrm/winrs.




From: Klaus Kaempf <[hidden email]>
To: John Smithman <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Wednesday, September 4, 2013 2:00 AM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

* John Smithman <[hidden email]> [Sep 04. 2013 04:53]:
> Klaus, I got cmake to work with everything but Java.
>
> -- Could NOT find JNI (missing:  JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
> CMake Warning at CMakeLists.txt:219 (MESSAGE):
>    Java jni.h not found

Run cmake with -DBUILD_JAVA=NO, this should disable Java.

>
>
> I went ahead and did the make and this is what happens.
>

Hmm, on my openSUSE 12.3 system, rdoc is bundled with Ruby. You have
rdoc in rubygems, which is external from core Ruby. Try to uninstall
rubygem-rdoc and try again.


Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

John Smithman
Klaus,

Do i need to run winrs.rb from one of the openwsman folders?

John-



From: John Smithman <[hidden email]>
To: Klaus Kaempf <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Wednesday, September 4, 2013 10:29 PM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

Klaus, doing both finally let me make and make install. Thanks.

Now I have run into trouble with the WinRM part.

So i downloaded winrs.rb to /tmp and try to run the command from what you said and following the output options and I get an error about not being able to resolve the hostname. I am not sure if I am executing winrs.rb from the correct directory, does it need to be placed in one of the wsman folders?

linux-67sd:/tmp # ruby winrs.rb -h 192.168.1.21 -u Administrator -p secret ipconfig
Client connection to http://Administrator:secret@192.168.1.21:5985/wsman failed with 6, Fault: Couldn't resolve host name
linux-67sd:/tmp #

winrm is running fine on the target Windows machine and I tested it by connecting from another Windows client over winrm/winrs.




From: Klaus Kaempf <[hidden email]>
To: John Smithman <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Wednesday, September 4, 2013 2:00 AM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

* John Smithman <[hidden email]> [Sep 04. 2013 04:53]:
> Klaus, I got cmake to work with everything but Java.
>
> -- Could NOT find JNI (missing:  JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
> CMake Warning at CMakeLists.txt:219 (MESSAGE):
>    Java jni.h not found

Run cmake with -DBUILD_JAVA=NO, this should disable Java.

>
>
> I went ahead and did the make and this is what happens.
>

Hmm, on my openSUSE 12.3 system, rdoc is bundled with Ruby. You have
rdoc in rubygems, which is external from core Ruby. Try to uninstall
rubygem-rdoc and try again.


Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

Klaus Kaempf
In reply to this post by John Smithman
* John Smithman <[hidden email]> [Sep 05. 2013 04:29]:
> Klaus, doing both finally let me make and make install. Thanks.
>
> Now I have run into trouble with the WinRM part.
>
> So i downloaded winrs.rb to /tmp and try to run the command from what you said and following the output options and I get an error about not being able to resolve the hostname. I am not sure if I am executing winrs.rb from the correct directory, does it need to be placed in one of the wsman folders?
>
> linux-67sd:/tmp # ruby winrs.rb -h 192.168.1.21 -u Administrator -p secret ipconfig
> Client connection to http://Administrator:secret@192.168.1.21:5985/wsman failed with 6, Fault: Couldn't resolve host name

Huh, haven't seen this type of error in a while.

First, ensure that the openwsman client can communicate with the
Windows server. This program should help you:

  require 'openwsman'
 
  client = Openwsman::Client.new "http://Administrator:secret@192.168.1.21:5985/wsman"
  client.transport.auth_method = Openwsman::BASIC_AUTH_STR
  options = Openwsman::ClientOptions.new
 
  doc = client.identify( options )
  unless doc
    puts "identify failed with #{client.last_error}:#{client.fault_string}"
    raise
  end
  root = doc.root
                 
  prot_version = root.ProtocolVersion
  prod_vendor = root.ProductVendor
  prod_version = root.ProductVersion
  puts "\tProtocol #{prot_version}\n\tVendor #{prod_vendor}\n\tVersion #{prod_version}"


>
> winrm is running fine on the target Windows machine and I tested it by connecting from another Windows client over winrm/winrs.

Successful Windows - Windows communication is a first step,
Linux - Windows communication is a bit different however. For example,
only http basic auth is supported. You have to explicitly tell this to
the client.
Also the Windows WinRM server has to allow basic authentication,
unencrypted.
See https://github.com/Openwsman/openwsman/wiki/winrm-over-openwsman-setup 
on how to configure WinRM appropriately.

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

Klaus Kaempf
In reply to this post by John Smithman
* John Smithman <[hidden email]> [Sep 05. 2013 05:26]:
> Klaus,
>
> Do i need to run winrs.rb from one of the openwsman folders?

No. It should be able to run stand-alone.

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

John Smithman
In reply to this post by Klaus Kaempf
Hi Klaus,

As I said, the target Windows server is configured correctly. The test program seems to work as well.

linux-67sd:/tmp # ruby test.rb
    Protocol http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
    Vendor Microsoft Corporation
    Version OS: 6.1.7600 SP: 0.0 Stack: 2.0
linux-67sd:/tmp #

Maybe a problem in the winrs.rb code?

John-



From: Klaus Kaempf <[hidden email]>
To: John Smithman <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Thursday, September 5, 2013 4:53 AM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

* John Smithman <[hidden email]> [Sep 05. 2013 04:29]:
> Klaus, doing both finally let me make and make install. Thanks.
>
> Now I have run into trouble with the WinRM part.
>
> So i downloaded winrs.rb to /tmp and try to run the command from what you said and following the output options and I get an error about not being able to resolve the hostname. I am not sure if I am executing winrs.rb from the correct directory, does it need to be placed in one of the wsman folders?
>
> linux-67sd:/tmp # ruby winrs.rb -h 192.168.1.21 -u Administrator -p secret ipconfig
> Client connection to http://Administrator:secret@192.168.1.21:5985/wsman failed with 6, Fault: Couldn't resolve host name

Huh, haven't seen this type of error in a while.

First, ensure that the openwsman client can communicate with the
Windows server. This program should help you:

  require 'openwsman'
 
  client = Openwsman::Client.new "http://Administrator:secret@192.168.1.21:5985/wsman"
  client.transport.auth_method = Openwsman::BASIC_AUTH_STR
  options = Openwsman::ClientOptions.new
 
  doc = client.identify( options )
  unless doc
    puts "identify failed with #{client.last_error}:#{client.fault_string}"
    raise
  end
  root = doc.root
                 
  prot_version = root.ProtocolVersion
  prod_vendor = root.ProductVendor
  prod_version = root.ProductVersion
  puts "\tProtocol #{prot_version}\n\tVendor #{prod_vendor}\n\tVersion #{prod_version}"


>
> winrm is running fine on the target Windows machine and I tested it by connecting from another Windows client over winrm/winrs.

Successful Windows - Windows communication is a first step,
Linux - Windows communication is a bit different however. For example,
only http basic auth is supported. You have to explicitly tell this to
the client.
Also the Windows WinRM server has to allow basic authentication,
unencrypted.
See https://github.com/Openwsman/openwsman/wiki/winrm-over-openwsman-setup
on how to configure WinRM appropriately.

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

John Smithman
In reply to this post by Klaus Kaempf
Klaus,

Will I still be able to do HTTPS between Linux client and a Windows target for sending the commands, is http basic auth just for the initial authentication for WinRM?

John-



From: Klaus Kaempf <[hidden email]>
To: John Smithman <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Thursday, September 5, 2013 4:53 AM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

* John Smithman <[hidden email]> [Sep 05. 2013 04:29]:
> Klaus, doing both finally let me make and make install. Thanks.
>
> Now I have run into trouble with the WinRM part.
>
> So i downloaded winrs.rb to /tmp and try to run the command from what you said and following the output options and I get an error about not being able to resolve the hostname. I am not sure if I am executing winrs.rb from the correct directory, does it need to be placed in one of the wsman folders?
>
> linux-67sd:/tmp # ruby winrs.rb -h 192.168.1.21 -u Administrator -p secret ipconfig
> Client connection to http://Administrator:secret@192.168.1.21:5985/wsman failed with 6, Fault: Couldn't resolve host name

Huh, haven't seen this type of error in a while.

First, ensure that the openwsman client can communicate with the
Windows server. This program should help you:

  require 'openwsman'
 
  client = Openwsman::Client.new "http://Administrator:secret@192.168.1.21:5985/wsman"
  client.transport.auth_method = Openwsman::BASIC_AUTH_STR
  options = Openwsman::ClientOptions.new
 
  doc = client.identify( options )
  unless doc
    puts "identify failed with #{client.last_error}:#{client.fault_string}"
    raise
  end
  root = doc.root
                 
  prot_version = root.ProtocolVersion
  prod_vendor = root.ProductVendor
  prod_version = root.ProductVersion
  puts "\tProtocol #{prot_version}\n\tVendor #{prod_vendor}\n\tVersion #{prod_version}"


>
> winrm is running fine on the target Windows machine and I tested it by connecting from another Windows client over winrm/winrs.

Successful Windows - Windows communication is a first step,
Linux - Windows communication is a bit different however. For example,
only http basic auth is supported. You have to explicitly tell this to
the client.
Also the Windows WinRM server has to allow basic authentication,
unencrypted.
See https://github.com/Openwsman/openwsman/wiki/winrm-over-openwsman-setup
on how to configure WinRM appropriately.

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

Klaus Kaempf
* John Smithman <[hidden email]> [Sep 06. 2013 04:18]:
> Klaus,
>
> Will I still be able to do HTTPS between Linux client and a Windows target for sending the commands, is http basic auth just for the initial authentication for WinRM?

Using https is possible, if configured correctly. See
https://github.com/Openwsman/openwsman/wiki/Https-with-winrm

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

John Smithman
Klaus,

Must be a problem with winrs.rb. The --url method does the same thing. Also this method replaces the password and port with a 0 when it returns an error.


linux-67sd:/tmp # ruby winrs.rb --url http://Administrator:secret@192.168.1.21:5985/wsman ipconfig
Client connection to http://:@Administrator:0//wsman failed with 6, Fault: Couldn't resolve host name
linux-67sd:/tmp # 

Any ideas what is wrong? does it do this for you as well?

John-


From: Klaus Kaempf <[hidden email]>
To: John Smithman <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Friday, September 6, 2013 4:22 AM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

* John Smithman <[hidden email]> [Sep 06. 2013 04:18]:
> Klaus,
>
> Will I still be able to do HTTPS between Linux client and a Windows target for sending the commands, is http basic auth just for the initial authentication for WinRM?

Using https is possible, if configured correctly. See
https://github.com/Openwsman/openwsman/wiki/Https-with-winrm

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to - Execute command on remote Windows machine?

John Smithman
Klaus,

Have you looked into this? Is it fixed in 2.4.0?

John-



From: John Smithman <[hidden email]>
To: Klaus Kaempf <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Friday, September 6, 2013 6:38 PM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

Klaus,

Must be a problem with winrs.rb. The --url method does the same thing. Also this method replaces the password and port with a 0 when it returns an error.


linux-67sd:/tmp # ruby winrs.rb --url http://Administrator:secret@192.168.1.21:5985/wsman ipconfig
Client connection to http://:@Administrator:0//wsman failed with 6, Fault: Couldn't resolve host name
linux-67sd:/tmp # 

Any ideas what is wrong? does it do this for you as well?

John-


From: Klaus Kaempf <[hidden email]>
To: John Smithman <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Friday, September 6, 2013 4:22 AM
Subject: Re: [Openwsman-devel] How to - Execute command on remote Windows machine?

* John Smithman <[hidden email]> [Sep 06. 2013 04:18]:
> Klaus,
>
> Will I still be able to do HTTPS between Linux client and a Windows target for sending the commands, is http basic auth just for the initial authentication for WinRM?

Using https is possible, if configured correctly. See
https://github.com/Openwsman/openwsman/wiki/Https-with-winrm

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel



------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
12