You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

NAME

Use-JobSchedulerWebService

SYNOPSIS

Connects to the JobScheduler Web Service.

SYNTAX

Use-JobSchedulerWebService -Url <Uri> [-Id <String>] [-Credentials <PSCredential>] [-ProxyUrl <Uri>] [[-ProxyCredentials] <PSCredential>] [-Base <String>] -Disconnect <CommonParameters>

DESCRIPTION

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

A connection to the JobScheduler 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?

Id

-Id <String>
Specifies the ID of a JobScheduler Master.

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

Credentials

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

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 to the -Credentials parameter.

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

ProxyUrl

-ProxyUrl <Uri>

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

ProxyCredentials

-ProxyCredentials <PSCredential>

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

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
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters?

Disconnect

-Disconnect <SwitchParameter>
This parameter is used to disconnect from a previously connected JobScheduler Web Service.

After successful connection to the JobScheduler Web Service a session is established that
will last until this cmdlet is used with the Disconnect parameter or the session timeout has been exceeded.

It is recommended to disconnect from the JobScheduler Web Service in order to ensure that the
current session is closed.

This parameter cannot be used with other parameters.

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

about_jobscheduler

EXAMPLES

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

C:\PS>cmdkey /generic:JobScheduler Web Service /user:root /pass:secret

$credentials = Get-JobSchedulerSystemCredentials -TargetName "JobScheduler Web Service"
Use-JobSchedulerWebService http://localhost:4446 -Credentials $credentials

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

The cmdlet returns an object with access information including the access token for the JobScheduler Web Service.

  • No labels