Work with deployments
This article explains how to work with available deployments on a server
Querying
Query all the server for deployments
To query for all deployments use the following command
$deployments=Get-ISHDeployment
- When the server has no active deployments then
$deployments
will be empty. - When the server has one deployment then
$deployments
will hold a reference to the one deployment, typically known as the default deployment. - When the server has multiple deployments then you can get a nice report using the
Format-Table
cmdlet.
$deployments|Format-Table Name,SoftwareVersion,DatabaseType,AccessHostname
Name SoftwareVersion DatabaseType AccessHostName
---- --------------- ------------ --------------
InfoShareORA 12.0.6112.5 oracle ish.example.com
InfoShareSQL12 12.0.6112.5 sqlserver2012 ish.example.com
InfoShareSQL14 12.0.6112.5 sqlserver2014 ish.example.com
Query the server for specific deployment
To query for one specific deployment use the following command when the projectsuffix
is empty.
Get-ISHDeployment -Name InfoShare
This outputs the following
SoftwareVersion : 12.0.6112.5
Name : InfoShareORA
AppPath : C:\InfoShare\App
WebPath : C:\InfoShare\Web
DataPath : C:\InfoShare\Data
DatabaseType : oracle
AccessHostName : ish.example.com
WebAppNameCM : ishcm
WebAppNameWS : ishws
WebAppNameSTS : ishsts
WebSiteName : Default Web Site
Status : Started
If the projectsuffix
was not empty then concatenate it after InfoShare
. For example
Get-ISHDeployment -Name InfoShareSQL
Using a deployment
All cmdlets that target a specific deployment are driven from the -ISHDeployment
parameter that expects as value a name of deployment or an instance.
To acquire an instance use the Get-ISHDeployment
.
The following two blocks are equal for the default deployment name InfoShare
.
# Using the deployment instance
$deploymentName="InfoShare"
$deployment = Get-ISHDeployment -Name $deploymentName
Get-ISHDeploymentHistory -ISHDeployment $deployment
# Using the deployment name
$deploymentName="InfoShare"
Get-ISHDeploymentHistory -ISHDeployment $deploymentName
Using the deployment name paradigm is the preferred way for remote invocation purposes.
Get the history of a deployment
All actions through the module's cmdlets are tracked and stored in a history file.
You can get the history like this
$deploymentName = "InfoShare"
Get-ISHDeploymentHistory -ISHDeployment $deploymentName
If you would execute the following.
# $deploymentName is the name of Deployment
# Set the license and enable the Content Editor
Set-ISHContentEditor -ISHDeployment $deploymentName -LicenseKey "licensekey" -Domain "ish.example.com"
Enable-ISHUIContentEditor -ISHDeployment $deploymentName
# Enable the Quality Assistant
Enable-ISHUIQualityAssistant -ISHDeployment $deploymentName
# Enable the External Preview using externalid
Enable-ISHExternalPreview -ISHDeployment $deploymentName -ExternalId "externalid"
and then again Get-ISHDeploymentHistory -ISHDeployment $deploymentName
outputs as an example of a history file.
<#ISHDeployScriptInfo
.VERSION 1.0
.MODULE ISHDeploy
.CREATEDBYMODULEVERSION 1.2
.UPDATEDBYMODULEVERSION 1.2
#>
param(
[Parameter(Mandatory=$false)]
[switch]$IncludeCustomFile=$false
)
# 20160314
$deploymentName = "InfoShare"
Set-ISHContentEditor -ISHDeployment $deploymentName -LicenseKey "licensekey" -Domain "ish.example.com"
Enable-ISHUIContentEditor -ISHDeployment $deploymentName
Enable-ISHUIQualityAssistant -ISHDeployment $deploymentName
Enable-ISHExternalPreview -ISHDeployment $deploymentName -ExternalId "externalid"
Disable-ISHUITranslationJob -ISHDeployment $deploymentName
Get the input parameters of a deployment
The module's cmdlets often modify the files on the file system. When the modified value was originally replaced by an InstallTool's input parameter, then the cmdlet will adapt also the current input parameters. Each deployment has two sets of input parameters known to the module.
- The Current that reflects to the history.
- The Original that was generated by InstallTool.
You can get each list like this
$deploymentName = "InfoShare"
# Get current set
Get-ISHDeploymentParameters -ISHDeployment $deploymentName
# Get original set
Get-ISHDeploymentParameters -ISHDeployment $deploymentName -Original
And the shortened outcome looks like this
Name Value
---- -----
osuser osuser
ospassword *******
...
databasetype sqlserver2014
apppath C:\InfoShare
webpath C:\InfoShare
datapath C:\InfoShare
workspacepath C:\InfoShare\_Workspace
infoshareauthorwebappname ishcm
infosharewswebappname ishws
infosharestswebappname ishsts
infosharecswebappname ishcs (for version 13.0.3 and higher)
websitename Default Web Site
...
To get a quick comparison execute
$deploymentName = "InfoShare"
Get-ISHDeploymentParameters -ISHDeployment $deploymentName -Changed
By default the Get-ISHDeploymentParameters
will mask all input parameters whose name contains the word password
.
To override this behavior use the -ShowPassword
parameter.
$deploymentName = "InfoShare"
# Get current set with clear passwords
Get-ISHDeploymentParameters -ISHDeployment $deploymentName -ShowPassword
Notice that similar values might be different between the output of Get-ISHDeployment
and Get-ISHDeploymentParameters
.
Get-ISHDeploymentParameters
will always return the value from the input parameters installation file but Get-ISHDeployment
will focus on providing output that is more useful when possible.
For example webpath
from Get-ISHDeploymentParameters
is the actual input parameter during installation (e.g. C:\InfoShare
) where WebPath
from Get-ISHDeployment
is derived and points to the exact location of the web applications (e.g. C:\InfoShare\Web
).
Get one input parameter of a deployment
Get-ISHDeploymentParameters
offers an additional parameter set that helps when working with one parameter.
When -Name
is specified then the cmdlet will return one record matching the specified name.
When -ValueOnly
is specified then the cmdlet will return only the value instead of the recordset.
For example Get-ISHDeploymentParameters -ISHDeployment $deploymentName -Name databasetype -ValueOnly
return just sqlserver2014
.
Developing a deployment
To help engineers write and debug scripts a cmdlet Undo-ISHFile
is provided.
All cmdlets in this module track and keep a backup of all vanilla files being modified. This allows the module to undo all file system changes without the requirement to uninstall and then re-install.
Undo-ISHFile -ISHDeployment $deploymentName
Clear history artifacts
Because the module's codebase is not connected with the InstallTool.exe
when you uninstall the module's artifacts will not be removed.
The Clear-ISHDeploymentHistory
takes care of this by removing all artifacts. You must use this cmdlet before uninstalling.
Clear-ISHDeploymentHistory -ISHDeployment $deploymentName