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

Compare with Current View Page History

« Previous Version 25 Next »

Name

Connect-JS7

SYNOPSIS

Connects to the JS7 JOC Cockpit Web Service.

SYNTAX

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>] [[-RootCertificatePath] <String>] [-SkipCertificateCheck] [-ControllerDetails] [<CommonParameters>]

PARAMETERS

Url

-Url <Uri>

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

Credentials

-Credentials <PSCredential>

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

Id

-Id <String>

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

AskForCredentials

-AskForCredentials <SwitchParameter>

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

UseDefaultCredentials

-UseDefaultCredentials <SwitchParameter>

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

ProxyUrl

-ProxyUrl <Uri>

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

ProxyCredentials

-ProxyCredentials <PSCredential>

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

ProxyUseDefaultCredentials

-ProxyUseDefaultCredentials <SwitchParameter>

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

Base

-Base <String>

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

Timeout

-Timeout <Int32>

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

SSLProtocol

-SSLProtocol <String>

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

Certificate

-Certificate <X509Certificate2>

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

CertificateThumbprint

-CertificateThumbprint <String>

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

KeyStorePath

-KeyStorePath <String>

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

RootCertificatePath

-RootCertificatePath <String>

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

SkipCertificateCheck

-SkipCertificateCheck <SwitchParameter>

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

ControllerDetails

-ControllerDetails <SwitchParameter>

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

about_JS7

EXAMPLES

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

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

Connects to the JS7 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-JS7 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 JS7ID that was used during installationn and the credential object.

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

PS > cmdkey /generic:JS7 Web Service /user:root /pass:root $credentials = Get-JS7SystemCredentials -TargetName "JS7 Web Service" Connect-JS7 -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-JS7SystemCredentials cmdlet and are forwarded to the Connect-JS7 cmdlet.

  • No labels