Versions Compared

Key

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

...

SYNOPSIS

Connects to the JS7 REST Web Service available from 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>] [[-KeyStoreCredentials] <PSCredential>] [[-RootCertificatePath] <String>] [[-RootCertificateCredentials] <PSCredential>] [-SkipCertificateCheck] [-ControllerDetails] [<CommonParameters>]

DESCRIPTION

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

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

The following REST Web Service API resources are used:

* /authentication/login
* /controller/switch
* /controller/ids
* /controllers

Caveat:
* This cmdlet calls the Invoke-WebRequest cmdlet that may throw an error 'The response content cannot be parsed because the Internet Explorer engine
is not available, or Internet Explorers first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.'

* This problem is limited to Windows. The reason for this error is a weird PowerShell dependency on IE assemblies.
* If Internet Explorer is not configured then it prompts the user for configuration when being launched.

* To disable IE's first launch configuration window you can modify the Windows registry
** by running a PowerShell script: Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Internet Explorer\Main' -Name 'DisableFirstRunCustomize' -Value 2
** by using the 'regedit' utility and navigating in the HKLM hive to the above key 'DisableFirstRunCustomize' and assigning the value '2'.
** this operation requires administrative permissions.

...