NetCmdlets 2016
NetCmdlets 2016
Questions / Feedback?

Invoke-PowerShellServer Cmdlet

Parameters   Output Objects   Configuration Settings  

The Invoke-PowerShellServer Cmdlet is used to remotely execute a command on the PowerShell Server.

Syntax

Invoke-PowerShellServer [parameters]

Remarks

This cmdlet uses SSH to invoke a remote command on the PowerShell session hosted by the remote PowerShell Server. Using the cmdlet is very simple. The command is specified by the Command parameter. The command is executed on the remote shell, and the resulting objects are serialized and sent back to the client. PSObject instances with matching fields are reconstructed locally and then returned by the Invoke-PowerShellServerExpression cmdlet.

The cmdlets support pipeline input for some of their parameters. Prebuilding an object and piping it to the cmdlet is very useful, but should be used with caution to prevent security conflicts. Steps have been taken to decrease the risk of a possibly accidental pipe to the cmdlet, for instance, the Credential parameter cannot be piped to the cmdlet and must be specified manually.


# create an SSH connection and store the connection object in a shell variable
$conn = Connect-PowerShellServer -server SERVER -cred $mycred
#invoke a command on the remote connection
Invoke-PowerShellServer $conn -command ls

Connection Handling

This cmdlet supports persistent connections through the Connection parameter. To establish a new PowerShellServer connection, use the Connect-PowerShellServer cmdlet. To close the connection, use the Disconnect-PowerShellServer cmdlet.

Parameter List


The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.

ConnectionAn already established connection.
LogFileThe location of a file to which debug information is written.
AuthModeThe type of authentication used by the cmdlet.
CertPasswordThe password to the certificate store.
CertStoreThe name of the certificate store for the client certificate.
CertStoreTypeThe type of certificate store for the client certificate.
CertSubjectThe subject of the certificate used for client authentication.
CommandThe command to send to the remote SSH Server.
CompressionAlgorithmsA comma-separated list containing all allowable compression algorithms.
ConfigSpecifies one or more configuration settings.
CredentialThe PSCredential object to use for user/password authentication.
EncryptionAlgorithmsA comma-separated list containing all allowable compression algorithms.
FirewallHostName or IP address of firewall.
FirewallPasswordA password if authentication is to be used when connecting through the firewall.
FirewallPortThe port of the firewall to which to connect.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
ForceForces the cmdlet to accept the default behavior instead of querying the user.
LocalIPThe IP address of the local interface to use.
LogFileThe location of a file to which debug information is written.
PasswordThe password to use for authentication.
PortThe port to be used.
ServerThe address of the Server.
SSHAcceptThe hex-encoded fingerprint of the host to trust explicitly.
TimeoutThe maximum time allowed for the operation.
UserThe username to use for authentication.

Output Objects


The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.

SSHOutputThe PSObject object returned by the Invoke-PowerShellServerExpression Cmdlet will have properties matching those of the original object in the remote machine.

Configuration Settings


The following is a list of configuration settings for the cmdlet with short descriptions. Click on the links for further details.

GSSAPIMechanismsThe desired GSS-API authentication mechanism.
KerberosRealmThe fully qualified domain name of the Kerberos Realm to use for GSSAPI authentication.
KerberosDelegationIf true, asks for credentials with delegation enabled during authentication.
KerberosSPNThe Kerberos Service Principal Name of the SSH host.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
NetCmdlets 2016 - Version 16.0 [Build 6335]