WSMan::WSBasic->new

Constructor that takes a hash argument containing key-value pairs.

Arguments

The constructor takes the following arguments.

Argument Description
address WS-Management server URL. Specify the transport protocol by adding http (basic user-password authentication) or https (HTTP with SSL encryption).
port Port on which the WS-Management server listens for requests.
path Path to the WS-Management server. The path is combined with the address and port arguments to form the complete URL of the WS-Management server. The resulting URL is http://address:port/path.
username User name for the WS-Management server.
password Password for the WS-Management server.
namespace CIM namespace. Default is root/cimv2.If the namespace is not root/cimv2, you must pass in the namespace of the class in this argument.
timeout (optional) Timeout for the HTTP request.

Example

$client = WSMan::WSBasic->new( address => 'http://www.abc.com/',
                           port => '80',
                           path => 'wsman',
                           username => 'wsman',
                           password => 'secret',
                           namespace => 'root/cimv2',    #optional
                           timeout => '60'               #optional
                        );