Previous Topic: objdump Command--Display Enumerable Properties of an Object (Cmdlet)Next Topic: push-winRemote Command--Copy and Execute on Multiple Remote Windows Systems (Funclet)


push-client Command--Install the Autoshell Client on a Remote Windows System (Funclet)

This command installs the AutoShell client on a remote Windows system.

This command copies and executes on one or multiple remote Windows systems. Available versions are:

The command has the following syntax:

(1) push-client -host hostname [-localPath path] [-user username>] [-pass password]
(2) push-client [-localPath path] [-user username>] [-pass password] on remoteTargets

The single-target command returns true on success.

The multi-target command returns an array of WinRemote objects. Each element of this array corresponds by position to the remote Windows node listed in the remoteTargets list. The WinRemote objects can verify whether errors occur and query the output and returned result if execution completes. If a remote node had been specified using an WinRemote object already, the array contains a reference to the original RemoteTarget object. If a target system is specified by a string, a new RemoteTarget object is created internally and assigned to the array.

-host hostname

(Optional) Specifies the name of the remote Windows host. Unquoted argument tokens are automatically stringified. Prevent automatic quoting for expressions by placing expression code in parentheses.

-localPath path

(Optional) Specifies the path pointing to the AutoShell client to copy. Unquoted argument tokens are automatically stringified. Prevent automatic quoting for expressions by placing expression code in parentheses. This parameter is only required when creating an SSH session on the fly using public key authentication.

Default: ""

-user username

(Optional) Specifies the user name to log in to the remote Windows server. The user must have rights to connect to the $ADMIN share. If no user name is specified, the user name entered during AutoShell login is used. Unquoted argument tokens are automatically stringified. Prevent automatic quoting for expressions by placing expression code in parentheses.

Default: $$User

-pass password

(Optional) Specifies password to use to log in to the remote node. If no password is specified, the password entered during AutoShell login is used. To enter a hidden password after issuing this command, specify PW_GET() with an optional prompt as argument. Unquoted argument tokens are automatically stringified. Prevent automatic quoting for expressions by placing expression code in parentheses.

Default: $$Pass

on remoteTargets

Specifies a comma-separated list of remote systems to run the specified script on. The target nodes can be identified in two ways: By hostname/address or by WinRemote objects. Specifying target systems by name or address while using WinRemote objects offers more flexibility to control the execution process, for example, different credentials for different hosts. WinRemote objects and strings with hostname/address can be mixed in the remote target list. Elements of the target list are not automatically stringified, so when using literal strings for hostnames they must be placed in quotes.

Examples

To install the AutoShell client on host1:

push-client -host host1

To install the AutoShell client on host1 and host2:

x = push-client on "host1", "host2";
? x[1].hasCompleted();
? x[1].result();
? x[1].output();

See also:

push-winRemote Command--Copy and Execute on Multiple Remote Windows Systems (Funclet)

rem-client Command--Remove the Autoshell Client from a Remote Windows System (Funclet)

run-client Command--Run the Autoshell Client on a Remote Windows System (Funclet)

run-winRemote Command--Execute a Command on Multiple Remote Windows Systems (Funclet)