Date: Thu, 28 Mar 2024 18:25:18 +0000 (UTC) Message-ID: <1030923450.11825.1711650318660@change.sos-berlin.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_11824_1152688062.1711650318660" ------=_Part_11824_1152688062.1711650318660 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The JS7 PowerShell=C2=AE= Module is available:
from the PowerShell=C2=AE= span> Gallery at https://www.powershel= lgallery.com/packages/JS7
F= ind-Module -Name JS7 Install-Module -Name JS7
C:\Users\<=
;user-name>\Documents\WindowsPowerShell\Modules\
or /home/&=
lt;user-name>/.local/share/powershell/Modules
for a Linux environ=
ment, see $env:PSModulePath
for predefined module locations.=
li>
C:\Windows\=
system32\WindowsPowerShell\v1.0\Modules\
js7-cli-powershell=
-v.2.0.8.zip
and the included top-level folder would be j=
s7-cli-powershell-v.2.0.8
.JS7<=
/code>. This is required as JS7
is the effective module name.<=
/li>
The JS7 PowerShell=C2=AE= Module can be used to control JS7 instances and workflow-relat= ed objects.
The module supports Windows PowerShell=C2=AE FullCLR 5= .1 and PowerShell=C2=AE CoreCLR 6.x and 7.x for Windows, Linux and MacOS environments. It can b= e used with JS7 releases 2.x. The module is used for the follow= ing areas of operation:
PS > Get-ExecutionPolicy
PS > Set-ExecutionPolicy RemoteSigned
PS > Set-ExecutionPolicy bypass -Scope process
PS > Import-Module JS7
$env:PSModulePath
for predefined module locations.PS > Import-Module C:\some_module_location\J=
S7
Hint: You can add the=
command Import-Module JS7 to your PowerShell=C2=AE profile to have the modu=
le loaded on start of a PowerShell=
=C2=AE session, see PowerShell CLI 1.1 - Us=
e Cases - Credentials Management.
As a first operation after importing the module it is necessary to execu=
te the Connect-JS7 cmdlet.
PS > Connect-JS7 -Url <Url> -AskForCr=
edentials
root
with the password root
.PS > Connect-JS7 <Url> <Credentials> <Controlle=
rId>
or PS > Connect-JS7 -Url <Url> -Credentials &=
lt;Credentials> -Id <ControllerId>
-Url
: specifies the URL of the JOC Cockpit which is the sa=
me URL that you use when opening the JOC Cockpit GUI in your browser, e.g.&=
nbsp;http://localhost:4=
446
. When omitting the protocol (HTTP/HTTPS) for the U=
RL then HTTP is used.-Credentials
: specifies the credentials, for example the u=
ser account and password that are used to connect to the JOC Cockpit.
Set-JS7Credentials -AskForCredentials
$credentials =3D ( New-Object -typename System.Management.Automat=
ion.PSCredential -ArgumentList 'root', ( 'root' | ConvertTo-SecureString -A=
sPlainText -Force) )
root
and password -Url
parameter like =
this:
Connect-JS7 -Url http://root:root@localhos=
t:4446
-Id
: specifies the Controller ID that is registered w=
ith the JOC Cockpit. As the JOC Cockpit can manage a number of Control=
lers the -Id
parameter can be used to select the relevant Cont=
roller.The JS7 PowerShell=C2=AE= module provides a number of cmdlets, see PowerShell CLI 2.0 - Cmdlets= . Return values of cmdlets generally correspond to the JS7 - REST Web Service API.
PS > Get-Command -Module JS7
JS=
7
:
PS > Get-JS7ControllerStatus
The term JS7
can further be omitted if the resul=
ting alias does not conflict with existing cmdlets:
PS > Get-ControllerStatus
PS > Get-Help Get-JS7ControllerStatus -detailed
PS > man Get-JS7ControllerStatus
Get-Help
command.Find some typical use cases for the JS7 PowerShell Module. More complex = use cases are available for example from JS7 - How To - Reporting.
PS > Get-JS7ControllerStatus -Display
PS > (Get-JS7Workflow).count
PS > (Get-JS7AgentInstance).count
PS > $orders =3D (Get-JS7Order -Folder /my_orders=
-Recursive | Suspend-JS7Order)
PS > $orders | Stop-JS7Order
JS7 cmdlets consider verbosity and debug settings.
PS > $VerbosePreference =3D "Continue"
PS > $VerbosePreference =3D "SilentlyContinue"
PS > $DebugPreference =3D "Continue"
PS > $DebugPreference =3D "SilentlyContinue"
Pages
Navigation