Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Connect-JS7 [-Url] <Uri> [[-Credentials] <PSCredential>] [[-Id] <String>] [-AskForCredentials] [-UseDefaultCredentials] [[-ProxyUrl] <Uri>] [[-ProxyCredentials] <PSCredential>] [-ProxyUseDefaultCredentials] [[-Base] <String>] [[-Timeout] <Int32>] [[-SSLProtocol] <String>] [[-Certificate] <X509Certificate2>] [[-CertificateThumbprint] <String>] [[-KeyStorePath] <String>] [[-KeyStoreCredentials] <PSCredential>] [[-RootCertificatePath] <String>] [[-RootCertificateCredentials] <PSCredential>] [-SkipCertificateCheck] [-ControllerDetails] [<CommonParameters>]

...

Required?false
Position?11
Default value
Accept pipeline input?true (ByValue, ByPropertyName)
Accept wildcard characters?false

KeyStoreCredentials

-KeyStoreCredentials <PSCredential>
Specifies the credentials for access to a keystore that is indicated with the -KeyStorePath parameter.

A credentials object can be created in a number of ways, e.g.:

$keyStoreCredentials = ( New-Object -typename System.Management.Automation.PSCredential -ArgumentList 'keystore', ( 'jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) )

The first argument 'keystore' is arbitrary, the second argument 'jobscheduler' specifies the password to the keystore.

Required?false
Position?12
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

RootCertificatePath

-RootCertificatePath <String>
Specifies the location of a file that holds the root certificate that was used when signing the JOC Cockpit
SSL certificate.

* For Windows environments the root certificate by default is looked up in the Windows Certificate Store, however,
this parameter can be used to apply a root certificate from a location in the file system.
* For Linux environments a path is specified to the root certificate file, e.g. *.pem, *.crt file, or to a truststore, e.g. *.jks, *.p12 file.

Required?false
Position?1213
Default value
Accept pipeline input?true (ByValue, ByPropertyName)
Accept wildcard characters?false

RootCertificateCredentials

-RootCertificateCredentials <PSCredential>
Specifies the credentials for access to a truststore that holds the root certificate.

A credentials object can be created in a number of ways, e.g.:

$trustStoreCredentials = ( New-Object -typename System.Management.Automation.PSCredential -ArgumentList 'truststore', ( 'jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) )

The first argument 'truststore' is arbitrary, the second argument 'jobscheduler' specifies the password to the truststore.

Required?false
Position?14
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

SkipCertificateCheck

-SkipCertificateCheck <SwitchParameter>
Specifies that the JOC Cockpit SSL certificate will not be checked, i.e. the identify of the JOC Cockpit instance is not verified.

Use of this parameter is strongly discouraged with secure environments as it trusts a JOC Cockpit SSL certificate without verification.

...

-------------------------- EXAMPLE 1 --------------------------

PS > Connect-JS7 -Url http://localhost4446 localhost:4446 -AskForCredentials

Connects to the JS7 Web Service at the indicated address and asks the user interactively to enter credentialsfor credentials.

-------------------------- EXAMPLE 2 --------------------------

PS > Connect-JS7 -Url https://js7-joc-promary:4443 -AskForCredentials -RootCertificatePath /home/sos/root-ca.crt

Connects to the JS7 Web Service with a secure HTTPS connection at the indicated address and asks the user interactively for credentials. In order to verfy the JOC Cockpit server certificate the corresponding root certificate is specified that was used when signing the server certificate.

-------------------------- EXAMPLE 2 3 --------------------------

PS > $credential $credentials = ( New-Object -typename System.Management.Automation.PSCredential -ArgumentList 'root', ( 'root' | ConvertTo-SecureString -AsPlainText -Force) )
Connect-JS7 -Url http://localhost:4446 $credential scheduler-Credentials $credentials -Id jobscheduler

A variable $credential is created that holds the credentials for the default root account of JOC Cockpit. When calling the cmdlet the URL is specified, the JS7ID Controller ID that was used during installationn and the credential object.

-------------------------- EXAMPLE 3 4 --------------------------

...

Prior to use with PowerShell with some external command ("cmdkey") a credential set is generated for the current user. The credentials are retrieved by use of the Get-JS7SystemCredentials cmdlet and are forwarded to the Connect-JS7 cmdlet.

-------------------------- EXAMPLE 5 --------------------------

PS > $trustStoreCredentials = ( New-Object -typename System.Management.Automation.PSCredential -ArgumentList 'truststore', ( 'jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) )
$keyStoreCredentials = ( New-Object -typename System.Management.Automation.PSCredential -ArgumentList 'keystore', ( 'jobscheduler' | ConvertTo-SecureString -AsPlainText -Force) )
Connect-JS7 -Url https://js7-joc-primary:4443 -Id jobscheduler -RootCertificatePath /home/sos/https-truststore.p12 -RootCertificateCredentials $trustStoreCredentials -KeyStorePath /home/sos/https-keystore.p12 -KeyStorePassword $keyStoreCredentials

This example assumes a secure HTTPS connection to JOC Cockpit with mutual authentication: * The -RootCertificatePath is specified that holds the root certificate that was used when signing the JOC Cockpit SSL server certificate. * The -KeyStorePath is specified that hold the private key and certificate for mutual authentication with JOC Cockpit. * A variable $trustStoreCredentials is created that holds the password for access to the the truststore with the root certificate. * A variable $keyStoreCredentials is created that holds the credentials for access to they keystore for mutual authentication.