PSClient Control
Properties Methods Events Configuration Settings Errors
The PSClient component can be used to execute PowerShell commands remotely on PowerShell Server.
Syntax
PSClient
Remarks
PSClient allows any PowerShell command to be executed remotely in a secure manner, using the SSH protocol. The results of the command execution are then returned as a list of objects, each one with a base type, an (optional) value and a collection of named properties.
Note: By default no profiles are loaded when executing. However you can use dot-sourcing to load any profile. For example:
./profiles/YourProfile.ps1
Property List
The following is the full list of the properties of the control with short descriptions. Click on the links for further details.
Connected | Triggers a connection or disconnection. |
FirewallAutoDetect | This property tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallType | This property determines the type of firewall to connect through. |
FirewallHost | This property contains the name or IP address of firewall (optional). |
FirewallPassword | This property contains a password if authentication is to be used when connecting through the firewall. |
FirewallPort | This property contains the TCP port for the firewall Host . |
FirewallUser | This property contains a user name if authentication is to be used connecting through a firewall. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where IPPort binds. |
PSObjectPropertyCount | The number of records in the PSObjectProperty arrays. |
PSObjectPropertyDataType | The type of this property Each property has a unique name, a value, a type and a boolean value indicating if it's null. |
PSObjectPropertyIsNull | True, if the property has a null value Each property has a unique name, a value, a type and a boolean value indicating if it's null. |
PSObjectPropertyName | The name of a property Each property has a unique name, a value, a type and a boolean value indicating if it's null. |
PSObjectPropertyValue | The value of this property Each property has a unique name, a value, a type and a boolean value indicating if it's null. |
PSObjectBaseType | The base type name of the current output object. |
PSObjectCount | The number of objects returned by the pipeline execution. |
PSObjectIndex | The index of the current object selected in the list of outputs. |
PSObjectValue | The value of the current output object. |
SSHAcceptServerHostKeyEncoded | The certificate (PEM/base64 encoded). |
SSHAuthMode | The authentication method to be used the component when performing an SSHLogon . |
SSHCertEncoded | The certificate (PEM/base64 encoded). |
SSHCertStore | The name of the certificate store for the client certificate. |
SSHCertStorePassword | If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store. |
SSHCertStoreType | The type of certificate store for this certificate. |
SSHCertSubject | The subject of the certificate used for client authentication. |
SSHCompressionAlgorithms | A comma-separated list containing all allowable compression algorithms. |
SSHEncryptionAlgorithms | A comma-separated list containing all allowable compression algorithms. |
SSHHost | The address of the SSH host. |
SSHKeyExchangeAlgorithms | A comma-separated list containing all allowable key exchange algorithms. |
SSHMacAlgorithms | A comma-separated list containing all allowable message authentication algorithms. |
SSHPassword | The password for SSH password-based authentication. |
SSHPort | The port on the SSH server where the SSH service is running; by default, 22. |
SSHPublicKeyAlgorithms | A comma-separated list containing all allowable public key authentication algorithms. |
SSHUser | The username for SSH authentication. |
Timeout | A timeout for the component. |
Method List
The following is the full list of the methods of the control with short descriptions. Click on the links for further details.
ClearOutput | Clears the output list. |
Config | Sets or retrieves a configuration setting . |
DoEvents | Processes events from the internal message queue. |
Execute | Execute a command on the remote PowerShell Server. |
GetPropertyValue | Looks up a property by name and returns the value. |
Interrupt | Stop execution of a running command. |
SSHLogoff | Logoff from the SSH server. |
SSHLogon | Logon to the selected server. |
Event List
The following is the full list of the events fired by the control with short descriptions. Click on the links for further details.
Connected | Fired immediately after a connection completes (or fails). |
ConnectionStatus | Fired to indicate changes in connection state. |
Disconnected | Fired when a connection is closed. |
Error | Information about errors during data delivery. |
PSObject | Fires when a new object is parsed on the server output. |
SSHKeyboardInteractive | Fired when the component receives a request for user input from the server. |
SSHServerAuthentication | Fired after the server presents its public key to the client. |
SSHStatus | Shows the progress of the secure connection. |
Configuration Settings
The following is a list of configuration settings for the control with short descriptions. Click on the links for further details.
StreamingMode | If set the component will only keep track of the last object returned. |
Encoding | The encoding to use for decoding data sent between client and server. |
ClientSSHVersionString | The SSH version string used by the component. |
SignedSSHCert | The CA signed client public key used when authenticating. |
SSHAcceptServerCAKey | The CA public key that signed the server's host key. |
SSHAcceptAnyServerHostKey | If set the component will accept any key presented by the server. |
SSHAcceptServerHostKeyFingerPrint | The fingerprint of the server key to accept. |
SSHKeyExchangeAlgorithms | Specifies the supported key exchange algorithms. |
SSHMacAlgorithms | Specifies the supported Mac algorithms. |
SSHKeyRenegotiate | Causes the component to renegotiate the SSH keys. |
KeyRenegotiationThreshold | Sets the threshold for the SSH Key Renegotiation. |
KerberosRealm | The fully qualified domain name of the Kerberos Realm to use for GSSAPI authentication. |
KerberosDelegation | If true, asks for credentials with delegation enabled during authentication. |
KerberosSPN | The Kerberos Service Principal Name of the SSH host. |
LogSSHPackets | If true, detailed SSH packet logging is performed. |
MaxPacketSize | The maximum packet size of the channel, in bytes. |
MaxWindowSize | The maximum window size allowed for the channel, in bytes. |
PreferredDHGroupBits | The size (in bits) of the preferred modulus (p) to request from the server. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
RecordLength | The length of received data records. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
UseIPv6 | Whether to use IPv6. |
TcpNoDelay | Whether or not to delay when sending packets. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
CodePage | The system code page used for Unicode to Multibyte translations. |