Name

Connect-JobScheduler

SYNOPSIS

Connects to the JobScheduler JOC Cockpit Web Service.

SYNTAX

Connect-JobScheduler [-Url] <Uri> [[-Credentials] <PSCredential>] [[-Id] <String>] [-AskForCredentials] [-UseDefaultCredentials] [[-ProxyUrl] <Uri>] [[-ProxyCredentials] <PSCredential>] [-ProxyUseDefaultCredentials] [[-Base] <String>] [[-Timeout] <Int32>] [[-SSLProtocol] <String>] [[-Certificate] <String>] [[-AddRootCertificate] <String>] [-SkipCertificateCheck] [<CommonParameters>]

DESCRIPTION

This cmdlet can be used with the JobScheduler JOC Cockpit Web Service starting from release 1.11.

A connection to the Web Service is established including support for credentials
and use of a proxy.

The cmdlet authenticates a user and returns an access token in case of successful authentication
that can be used for subsequent requests to the Web Service.

PARAMETERS

Url

-Url <Uri>
Specifies the URL to access the Web Service.

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

Credentials

-Credentials <PSCredential>
Specifies a credentials object that is used to authenticate the account with the JobScheduler Web Service.

Credentials can be specified in a script:

* PS C:\> $credential = ( New-Object -typename System.Management.Automation.PSCredential -ArgumentList 'root', ( 'root' | ConvertTo-SecureString -AsPlainText -Force) )

Credentials sets can be managed with Windows built-in tools such as:

* PS C:\> cmdkey /generic:JobScheduler Web Service /user:root /pass:secret
* The Windows Credential Manager that is available Windows Control Panel.

A previously created credentials set can be retrieved by use of the cmdlet:

* PS C:\> $credentials = Get-JobSchedulerSystemCredentials -TargetName "JobScheduler Web Service"

The credentials object can be assigned the -Credentials parameter.

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

Id

-Id <String>
Specifies the ID of a JobScheduler Master that was used during installation of the product.
If no ID is specified then the first JobScheduler Master registered with JOC Cockpit will be used.

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

AskForCredentials

-AskForCredentials <SwitchParameter>
Specifies that the user is prompted for the account and password that are used for authentication with JobScheduler.

Required?false
Position?named
Default valueFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

UseDefaultCredentials

-UseDefaultCredentials <SwitchParameter>
This parameter currently is not used. It is provided for future versions of JOC Cockpit that support single sign on.

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

ProxyUrl

-ProxyUrl <Uri>
If JOC Cockpit is accessed via a proxy server then the proxy server URL is specified with this parameter.

Required?false
Position?4
Default value
Accept pipeline input?false
Accept wildcard characters?false

ProxyCredentials

-ProxyCredentials <PSCredential>
If JOC Cockpit is accessed via a proxy server that requires authentication then the credential set
for the proxy server can be specified with this parameter.

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

ProxyUseDefaultCredentials

-ProxyUseDefaultCredentials <SwitchParameter>
This parameter currently is not used. It is provided for future versions of JOC Cockpit that support single sign on.

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

Base

-Base <String>
The Base is used as a prefix to the Path for web service URLs and is configured with the web server
that hosts the JobScheduler Web Service.

This value is fixed and should not be modified for most use cases.

Default: /joc/api

Required?false
Position?6
Default value/joc/api
Accept pipeline input?true (ByValue, ByPropertyName)
Accept wildcard characters?false

Timeout

-Timeout <Int32>
Specifies the timeout to wait for the JOC Cockpit Web Service response.

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

SSLProtocol

-SSLProtocol <String>
This parameter can be used to specify the TLS protocol version that should be used. The protocol version is agreed
on between the JOC Cockpit web server and the PowerShell client. Both server and client have to identify a common
protocol version.

* -SSLProtocol 'Tls'
** use any TLS protocol version available
* -SSLProtocol 'Tls12'
** use TLS protocol version 1.2 only
* -SSLProtocol 'Tls11,Tls12'
** use TLS protocol version 1.1 or 1.2 only

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

Certificate

-Certificate <String>
This parameter currently is not used. It is provided for future releases of JOC Cockpit
that support client authentication certificates.

The certificate specified with this parameter replaces the account/password specified during login.

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

AddRootCertificate

-AddRootCertificate <String>
Specifies the location of a file that holds the root certificate that was 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.

Required?false
Position?10
Default value
Accept pipeline input?true (ByValue, 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.

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

about_jobscheduler

EXAMPLES

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

PS > Connect-JobScheduler http://localhost4446 -AskForCredentials

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

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

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

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 JobSchedulerID that was used during installationn and the credential object.

-------------------------- EXAMPLE 3 --------------------------

PS > cmdkey /generic:JobScheduler Web Service /user:root /pass:root $credentials = Get-JobSchedulerSystemCredentials -TargetName "JobScheduler Web Service" Connect-JobScheduler -Url http://localhost:4446 -Credentials $credentials

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-JobSchedulerSystemCredentials cmdlet and are forwarded to the Connect-JobScheduler cmdlet.

  • No labels