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 if execution completes, if errors occur, and query the output and the returned result if execution finishes. 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.
(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 parenthesis.
(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 parenthesis. This parameter is only required when creating an SSH session on the fly using public key authentication.
Default: ""
(Optional) Specifies the user name to log on 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 parenthesis.
Default: $$User
(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 parenthesis.
Default: $$Pass
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();
Copyright © 2013 CA. All rights reserved. |
|