Post on 26-Jan-2021
GBS www.gbs.com Page 2
Content
1 Introduction ..................................................................................................................... 12
2 Requirements for the Use of PowerShell Provider...................................................... 13
3 Basic CmdLets to Edit Configuration Objects ............................................................. 14
3.1 Get-iQ ....................................................................................................... 14
3.2 New-iQ ..................................................................................................... 16
3.3 Save-iQ .................................................................................................... 17
3.4 Remove-iQ ............................................................................................... 19
4 Open/Close PowerShell Session ................................................................................... 22
4.1 Open-iQSession ............................................................................................................... 22
4.2 Close-iQSession ............................................................................................................... 23
5 Getting Help for CmdLets .............................................................................................. 24
5.1 Help about a PowerShell CmdLet .................................................................................... 24
5.2 Help about the ‘Get-Help’ CmdLet ................................................................................... 24
5.3 List of all CmdLet Help Topics .......................................................................................... 24
5.4 Detailed Information about a CmdLet ............................................................................... 25
5.5 All Content of a Help Topic ............................................................................................... 25
5.6 Help about the Parameters of a CmdLet .......................................................................... 25
5.7 Examples of a Help Topic ................................................................................................ 26
6 General CmdLets ............................................................................................................ 27
6.1 Get-iQGeneralTimezones ................................................................................................ 27
6.2 Object ‘Timezone’ ............................................................................................................. 27
7 CmdLets for Mail Transport Jobs .................................................................................. 29
7.1 Task: Enable Mail Transport Jobs .................................................................................... 31
7.2 Task: Disable Mail Transport Jobs ................................................................................... 31
8 CmdLets for FingerPrints ............................................................................................... 33
http://www.gbs.com/
GBS www.gbs.com Page 3
8.1 Categories for Fingerprints ............................................................................................... 33
8.1.1 Task: Create Fingerprint Category ............................................................................ 33
8.1.2 Task: Change Fingerprint Category .......................................................................... 34
8.1.3 Task: Delete Fingerprint Category ............................................................................ 34
8.2 Fingerprints ....................................................................................................................... 35
8.2.1 Task: Change Display Name of a Fingerprint ........................................................... 38
8.2.2 Task: Change Allowed Characters ............................................................................ 38
8.2.3 Task: Change Name Patterns ................................................................................... 40
8.2.4 Task: Change ‘All fingerprint criteria have to match’ ................................................. 41
8.2.5 Task: Display/Change Binary Patterns ..................................................................... 41
8.2.6 Task: Change Categories ......................................................................................... 46
9 CmdLets for Trailer Documents .................................................................................... 48
9.1 Task: Create Trailer Document ........................................................................................ 50
9.2 Task: Load HTML Content from a File ............................................................................. 50
9.3 Task: Change Plain-Text Content .................................................................................... 51
9.4 Task: Set Time-Limited Use ............................................................................................. 51
10 CmdLets for Trailer Images ........................................................................................... 53
10.1 Categories for Trailer Images ........................................................................................... 53
10.1.1 Task: Create Category for Trailer Images ................................................................. 54
10.1.2 Task: Change Category for Trailer Images ............................................................... 54
10.1.3 Task: Remove Category for Trailer Images .............................................................. 54
10.2 Trailer Images ................................................................................................................... 55
10.2.1 Conventional Trailer Images ..................................................................................... 55
10.2.1.1 Task: Load Image File in TrailerImage Object ................................................ 57
10.2.1.2 Task: Save Image from TrailerImage Object to File ....................................... 57
10.2.1.3 Task: Set Name of Trailer Attachment ............................................................ 58
10.2.1.4 Task: Set in Category (Move) ......................................................................... 59
10.2.1.5 Task: Delete from a Category ......................................................................... 59
10.2.2 Personalized Trailer Images ..................................................................................... 60
10.2.2.1 Task: Create Personalized Trailer Image ....................................................... 62
10.2.2.2 Task: Set Default Image ................................................................................. 63
http://www.gbs.com/
GBS www.gbs.com Page 4
10.2.2.3 Task: Set Format ............................................................................................ 63
10.2.2.4 Task: Set ‘Ignore image dimensions’ .............................................................. 64
10.2.2.5 Task: Set Attachment Name and ‘Active Directory’ Field Name .................... 64
10.2.2.6 Task: Set in Category (Move) ......................................................................... 65
10.2.2.7 Task: Remove from a Category ...................................................................... 65
11 CmdLets for Trailer Attachments .................................................................................. 66
11.1 Categories for Trailer Attachments ................................................................................... 66
11.1.1 Task: Create Category for Trailer Attachments ........................................................ 67
11.1.2 Task: Change Category for Trailer Attachments ....................................................... 67
11.1.3 Task: Remove Category for Trailer Attachments ...................................................... 67
11.2 Trailer Attachments .......................................................................................................... 68
11.2.1 Conventional Trailer Attachments ............................................................................. 69
11.2.1.1 Task: Create Trailer Attachment ..................................................................... 71
11.2.1.2 Task: Change User-Defined Content Type ..................................................... 71
11.2.1.3 Task: Change Content Type ........................................................................... 72
11.2.1.4 Task: Provide Text as QR Code Image in Trailer Documents ........................ 74
11.2.1.5 Task: Set in Category (Move) ......................................................................... 75
11.2.1.6 Task: Remove from a Category ...................................................................... 75
11.2.2 Binary Trailer Attachments ........................................................................................ 76
11.2.2.1 Task: Create Binary Trailer Attachment with Loading a File Content ............. 78
11.2.2.2 Task: Change Attachment Name and (User-Defined) Content Type ............. 79
11.2.2.3 Task: Save Content of a Binary Trailer Attachment to a File .......................... 79
11.2.2.4 Task: Set in Category (Move) ......................................................................... 80
11.2.2.5 Task: Remove from a Category ...................................................................... 80
11.2.3 Trailer Attachments of Type ‘vCard’ .......................................................................... 81
11.2.3.1 Task: Create vCard Attachment ...................................................................... 83
11.2.3.2 Task: Enable Individual vCard Fields ............................................................. 83
11.2.3.3 Task: Enable All vCard Fields ......................................................................... 84
11.2.3.4 Task: Disable Individual vCard Fields ............................................................. 85
11.2.3.5 Task: Disable All vCard Fields ........................................................................ 85
11.2.3.6 Task: Provide Text as QR Code Image in Trailer Documents ........................ 86
11.2.3.7 Task: Set in Category (Move) ......................................................................... 86
http://www.gbs.com/
GBS www.gbs.com Page 5
11.2.3.8 Task: Remove from Category ......................................................................... 86
12 CmdLets for Active Directory ........................................................................................ 87
12.1 Parameter ......................................................................................................................... 87
12.2 Object ‘DirectoryItem’ ....................................................................................................... 88
12.3 Examples .......................................................................................................................... 88
13 CmdLets for Clerk Notifications .................................................................................... 90
13.1 Get-iQClerkAbsenceNotification / Get-iQClerkDeputyNotification ................................... 90
13.2 New-iQClerkAbsenceNotification / New-iQClerkDeputyNotification ................................ 90
13.3 Save-iQClerkAbsenceNotification / Save-iQClerkDeputyNotification .............................. 91
13.4 Remove-iQClerkAbsenceNotification / Remove-iQClerkDeputyNotification .................... 92
13.5 Object ‘AbsenceNotification’ / ‘DeputyNotification’ ........................................................... 92
13.6 Examples .......................................................................................................................... 92
14 CmdLets for Clerk Images ............................................................................................. 95
14.1 Get-iQClerkImage ............................................................................................................. 95
14.2 New-iQClerkImage ........................................................................................................... 95
14.3 Save-iQClerkImage .......................................................................................................... 96
14.4 Remove-iQClerkImage ..................................................................................................... 96
14.5 Object ‘Image’ ................................................................................................................... 96
14.6 Examples .......................................................................................................................... 97
15 CmdLets for Clerk Absences ....................................................................................... 100
15.1 Get-iQClerkAbsence ....................................................................................................... 100
15.2 New-iQClerkAbsenceOneTime / New-iQClerkAbsencePeriodic.................................... 101
15.3 Set-iQClerkAbsenceSettings .......................................................................................... 102
15.4 Save-iQClerkAbsence .................................................................................................... 104
15.5 Remove-iQClerkAbsence ............................................................................................... 105
15.6 Object ‘AbsenceOneTime’ / ‘AbsencePeriodic’ .............................................................. 105
15.7 Object ‘AbsenceSettingsOneTime’ / ‘AbsenceSettingsPeriodic’ .................................... 106
15.8 Object ‘WeekdaysTimer’................................................................................................. 109
15.9 Examples ........................................................................................................................ 110
http://www.gbs.com/
GBS www.gbs.com Page 6
16 CmdLets for Clerk Policies .......................................................................................... 113
16.1 Get-iQClerkPolicyAbsence ............................................................................................. 113
16.2 New-iQClerkPolicyAbsence ........................................................................................... 113
16.3 Set-iQClerkPolicyAbsenceTemplate .............................................................................. 114
16.4 Set-iQClerkPolicyAbsencePermissions .......................................................................... 114
16.5 Save-iQClerkPolicyAbsence .......................................................................................... 115
16.6 Remove-iQClerkPolicyAbsence ..................................................................................... 116
16.7 Object ‘PolicyAbsence’ ................................................................................................... 116
16.8 Object ‘PolicyPermissions’ ............................................................................................. 117
16.9 Examples ........................................................................................................................ 117
17 CmdLets for Clerk Delegations ................................................................................... 120
17.1 Get-iQClerkDelegation ................................................................................................... 120
17.2 New-iQClerkDelegation .................................................................................................. 121
17.3 Save-iQClerkDelegation ................................................................................................. 121
17.4 Remove-iQClerkDelegation ............................................................................................ 121
17.5 Object ‘Delegation’ ......................................................................................................... 122
17.6 Examples ........................................................................................................................ 123
18 CmdLets for ‚Simple‘ Clerk Configuration ................................................................. 126
18.1 Get-iQClerkConfig .......................................................................................................... 126
18.2 Update-iQClerkConfig .................................................................................................... 126
18.3 Object ‘Clerk.SimpleConfig‘ ............................................................................................ 127
19 CmdLets for Address Lists .......................................................................................... 128
19.1 Get-iQAddressList .......................................................................................................... 128
19.2 New-iQAddressList ......................................................................................................... 129
19.3 Save-iQAddressList ........................................................................................................ 129
19.4 Remove-iQAddressList................................................................................................... 130
19.5 Object ‘AddressListGlobal’ ............................................................................................. 130
20 CmdLets for the Password Management ................................................................... 132
20.1 Get-iQPasswordManager ............................................................................................... 132
http://www.gbs.com/
GBS www.gbs.com Page 7
20.2 Get-iQPasswordEntry ..................................................................................................... 132
20.3 New-iQPasswordEntry ................................................................................................... 134
20.4 Update-iQPasswordEntry ............................................................................................... 135
20.5 Remove-iQPasswordEntry ............................................................................................. 136
20.6 Set-iQPasswordEntryObsolete ....................................................................................... 136
20.7 Object ‘PasswordManager’ ............................................................................................ 137
20.8 Object ‘PasswordEntry’ .................................................................................................. 137
21 CmdLets for User Licensing ........................................................................................ 140
21.1 Get-iQUserLicense ......................................................................................................... 140
21.2 Get-iQUserLicenseAvailable .......................................................................................... 141
21.3 Add-iQUserLicense ........................................................................................................ 142
21.4 Update-iQUserLicense ................................................................................................... 143
21.5 Remove-iQUserLicense ................................................................................................. 143
21.6 Object ‘License’ .............................................................................................................. 144
21.7 Object ‘UserLicense’ ....................................................................................................... 144
21.8 Object ‘AssignedLicense’ ............................................................................................... 145
21.9 Object ‘UserLicenseResult’ ............................................................................................ 145
21.10 Object ‘LicenseResult’ .................................................................................................... 146
22 CmdLets for Administrative Tasks ............................................................................. 147
22.1 Display Your Own Roles................................................................................................. 147
22.2 Server Status .................................................................................................................. 148
22.2.1 Object ‘StatusServer’ ............................................................................................... 149
22.2.2 Object ‘StatusConfiguration’ .................................................................................... 151
22.2.3 Object ‘StatusDirectory’ ........................................................................................... 152
22.2.4 Object ‘StatusEngine’ .............................................................................................. 153
22.2.5 Object ‘StatusEWSScan’ ......................................................................................... 154
22.2.6 Object ‘StatusLicense’ ............................................................................................. 155
22.2.7 Object ‘StatusSync’ ................................................................................................. 156
22.2.8 Object ‘StatusSyncServer’ ...................................................................................... 157
22.2.9 Object ‘StatusQueues’............................................................................................. 157
http://www.gbs.com/
GBS www.gbs.com Page 8
22.3 Status of the Quarantines ............................................................................................... 158
22.4 Status of the iQ.Suite Services ....................................................................................... 160
22.5 Events of iQ.Suite ........................................................................................................... 161
22.6 CmdLets for Server Administration ................................................................................ 164
22.6.1 Get-iQUpdateManagerPatternInfo .......................................................................... 164
22.6.2 Push-iQLicense ....................................................................................................... 165
22.6.3 Get-iQEventLogLevel .............................................................................................. 166
22.6.4 Set-iQEventLogLevel .............................................................................................. 167
22.6.5 Get-iQServerDebugLog .......................................................................................... 167
22.6.6 Set-iQServerDebugLog ........................................................................................... 169
22.6.7 Get-iQUpdaterStatus ............................................................................................... 170
22.6.8 Set-iQUpdaterStatus ............................................................................................... 171
22.6.9 Update-iQEngine ..................................................................................................... 172
22.6.10 Test-iQEngine ......................................................................................................... 175
22.6.11 Test-iQTnef2MimeDecoder ..................................................................................... 177
22.6.12 Test-iQArchiveConnector ........................................................................................ 178
22.6.13 Test-iQConnectConnector ...................................................................................... 178
22.6.14 Get-iQInformationStoreScanMailboxes ................................................................... 179
22.6.15 Get-iQInformationStoreScanReport ........................................................................ 180
22.6.16 Start-iQInformationStoreScan ................................................................................. 187
22.7 CmdLets for Master Configurations in Multi-Tenant-Environments ............................... 191
22.7.1 Get-iQMTMasterConfig ........................................................................................... 191
22.7.2 New-iQMasterConfig ............................................................................................... 191
22.7.3 Save-iQMTMasterConfig ......................................................................................... 191
22.7.4 Remove-iQMTMasterConfig ................................................................................... 192
22.7.5 Get-iQMTMasterConfigRoles .................................................................................. 192
22.7.6 Add-iQMTMasterConfigToRoles ............................................................................. 192
22.7.7 CmdLets for Security Contexts of Master Configurations ....................................... 193
22.7.7.1 Reset-iQMTMasterConfigSecurityContext .................................................... 193
22.7.7.2 Update-iQMTMasterConfigSecurityContext ................................................. 193
22.7.7.3 Update-iQMTServerAllSecurityContexts ...................................................... 193
22.7.8 CmdLets for the Administration of Master Configurations ...................................... 193
http://www.gbs.com/
GBS www.gbs.com Page 9
22.7.8.1 Get-iQMTMasterConfigSwitchTo .................................................................. 193
22.7.8.2 Connect-iQMTMasterConfigSwitchTo .......................................................... 193
22.7.8.3 Lock-iQMTMasterConfig ............................................................................... 194
22.7.8.4 Unlock-iQMTMasterConfig ............................................................................ 194
22.7.8.5 Get-iQMTMasterConfigData ......................................................................... 194
22.7.8.6 Push-iQMTMasterConfigData ....................................................................... 194
22.7.8.7 Use-iQMTMasterConfigApply ....................................................................... 194
22.7.9 Object ‘MasterConfig’ .............................................................................................. 195
22.7.10 Object ‘MasterConfigReference’ ............................................................................. 195
22.7.11 Object ‘MasterConfigSwitchTo’ ............................................................................... 196
22.8 CmdLets for Servers in Multi-Tenant-Environments ...................................................... 197
22.8.1 Get-iQMTServer ...................................................................................................... 197
22.8.2 New-iQMTServer ..................................................................................................... 197
22.8.3 Save-iQMTServer .................................................................................................... 198
22.8.4 Remove-iQMTServer .............................................................................................. 198
22.8.5 Register-iQMTServer .............................................................................................. 198
22.8.6 Set-iQMTServerState .............................................................................................. 199
22.8.7 Get-iQMTServerRoles ............................................................................................. 199
22.8.8 Add-iQMTServerToRoles ........................................................................................ 200
22.8.9 CmdLets for Security Contexts of Servers .............................................................. 200
22.8.9.1 Reset-iQMTServerSecurityContext............................................................... 200
22.8.9.2 Update-iQMTServerSecurityContext ............................................................ 200
22.8.9.3 Update-iQMTServerAllSecurityContexts ...................................................... 200
22.8.10 CmdLets for the Administration of Server Configurations ....................................... 201
22.8.10.1 Get-iQMTServerSwitchTo ............................................................................. 201
22.8.10.2 Connect-iQMTServerSwitchTo ..................................................................... 201
22.8.10.3 Lock-iQMTServerConfig ............................................................................... 201
22.8.10.4 Unlock-iQMTServerConfig ............................................................................ 201
22.8.10.5 Get-iQMTServerConfig ................................................................................. 201
22.8.10.6 Push-iQMTServerConfig ............................................................................... 202
22.8.11 CmdLets for Moving Tenants to Servers ................................................................. 202
22.8.11.1 Get-iQMTServerMoveTo ............................................................................... 202
http://www.gbs.com/
GBS www.gbs.com Page 10
22.8.11.2 Move-iQMTServerTo .................................................................................... 202
22.8.12 Object ‘Server’ ......................................................................................................... 203
22.8.13 Object ‘ServerReference’ ........................................................................................ 204
22.8.14 Object ‘ServerSwitchTo’ .......................................................................................... 204
22.9 CmdLets for Tenants in Multi-Tenant Environments ...................................................... 206
22.9.1 Get-iQMTTenant ..................................................................................................... 206
22.9.2 New-iQMTTenant .................................................................................................... 206
22.9.3 New-iQMTDBConnection ........................................................................................ 207
22.9.4 New-iQMTTenantAzureConnection ........................................................................ 208
22.9.5 New-iQMTTenantADConnection ............................................................................. 209
22.9.6 Set-iQMTTenantDirectory ....................................................................................... 210
22.9.7 Save-iQMTTenant ................................................................................................... 211
22.9.8 Remove-iQMTTenant .............................................................................................. 211
22.9.9 Set-iQMTTenantState ............................................................................................. 211
22.9.10 Get-iQMTTenantGroups ......................................................................................... 212
22.9.11 Get-iQMTTenantUsers ............................................................................................ 212
22.9.12 Get-iQMTTenantRoles ............................................................................................ 212
22.9.13 Add-iQMTTenantToRoles ....................................................................................... 213
22.9.14 CmdLets for Security Contexts of Tenants ............................................................. 213
22.9.14.1 Reset-iQMTTenantSecurityContext .............................................................. 213
22.9.14.2 Update-iQMTTenantSecurityContext ............................................................ 214
22.9.14.3 Update-iQMTTenantAllSecurityContexts ...................................................... 214
22.9.15 CmdLets for the Administration of Tenant Configurations ...................................... 214
22.9.15.1 Get-iQMTTenantSwitchTo ............................................................................ 214
22.9.15.2 Connect-iQMTTenantSwitchTo ..................................................................... 214
22.9.15.3 Get-iQMTTenantMy ...................................................................................... 214
22.9.15.4 Lock-iQMTTenantConfig ............................................................................... 214
22.9.15.5 Unlock-iQMTTenantConfig ........................................................................... 215
22.9.15.6 Get-iQMTTenantConfig ................................................................................. 215
22.9.15.7 Push-iQMTTenantConfig .............................................................................. 215
22.9.15.8 Get-iQMTTenantLicense ............................................................................... 215
22.9.15.9 Push-iQMTTenantLicense ............................................................................ 215
http://www.gbs.com/
GBS www.gbs.com Page 11
22.9.15.10 Get-iQMTTenantLdif ..................................................................................... 216
22.9.15.11 Push-iQMTTenantLdif ................................................................................... 216
22.9.16 Object ‘Tenant’ ........................................................................................................ 216
22.9.17 Object ‘TenantReference’ ....................................................................................... 218
22.9.18 Object ‘TenantSwitchTo’ ......................................................................................... 218
22.10 CmdLets for Statistics ..................................................................................................... 219
22.10.1 General Use ............................................................................................................ 219
22.10.2 Statistical Parameters for Basic and Advanced Statistics ....................................... 219
22.10.3 Excel Generation Parameters for Basic and Advanced Statistics .......................... 221
22.10.4 StatisticHelper ......................................................................................................... 222
22.10.5 BasicStatistics ......................................................................................................... 226
22.10.6 AdvancedStatistic .................................................................................................... 228
23 Authentication with Azure ............................................................................................ 230
23.1 WebClient Authentication with Azure Active Directory ................................................... 230
23.1.1 Settings in the Azure Active Directory ..................................................................... 230
23.1.2 Settings in the dynamic_configuration.xml .............................................................. 235
23.1.2.1 Authorization and Group Resolution in Azure AD ......................................... 235
23.1.2.2 Authorization in Azure AD and Group Resolution in LDIF File ..................... 235
23.1.3 Resetting the SecurityContext ................................................................................. 235
23.2 Creating an Azure App for PowerShell Provider ............................................................ 236
23.3 Configuration of iQ.Suite WebClient ............................................................................... 238
23.4 Using PowerShell Provider with Azure ........................................................................... 238
24 About GBS ..................................................................................................................... 239
http://www.gbs.com/
GBS www.gbs.com Page 12
1 Introduction
Windows PowerShell Provider can be used as an administration tool to execute the functions available
in iQ.Suite WebClient by means of CommandLets (short CmdLets):
■ Enable/Disable iQ.Suite Mail Transport Jobs
■ Create and edit fingerprints
■ iQ.Suite Trailer: Create and edit Trailer documents, Trailer images and Trailer attachments
■ Administrative tasks: e.g. display server status, status of the Quarantines and iQ.Suite Events;
server administration.
Password Management, Quarantines and User Lists cannot be managed via PowerShell. This is only
possible in the iQ.Suite administration console or in iQ.Suite WebClient.
The PowerShell Provider uses the same WebApp as iQ.Suite WebClient.
To be able to execute PowerShell CmdLets, first open a session in the WebApp with the Open-
iQSession CmdLet (see chapter 4). In the open session, you can then access to iQ.Suite objects via
CmdLets.
This documentation contains examples which can be taken over into your iQ.Suite PowerShell per
copy-and-paste. However, you must adjust the values of the parameters like e.g. Displayname or ID
to your configuration.
Example as Mail Transport Jobs with the ID ‘134’:
$job = Get-iQTransportJob 134
http://www.gbs.com/
GBS www.gbs.com Page 13
2 Requirements for the Use of PowerShell Provider
To be able to use PowerShell Provider for iQ.Suite, the following requirements must be fulfilled:
■ iQ.Suite WebClient must be installed and accessible per HTTP or HTTPS.
■ Windows PowerShell in Version ≥ 3.0 must be installed.
■ PowerShell Provider for iQ.Suite must be installed locally.
PowerShell Provider is available as feature in the iQ.Suite setup and can be installed together
with iQ.Suite.
■ You need a WebClient user with appropriate permissions to access the objects you want to edit
or call via PowerShell. The permissions are set in WebClient in the Roles & Rights component,
e.g. Edit Trailer documents.
■ PowerShell basic knowledge
http://www.gbs.com/
GBS www.gbs.com Page 14
3 Basic CmdLets to Edit Configuration Objects
In this chapter, you will find a description of the four basic types of CmdLets which exist for all iQ.Suite
objects which can be edited via PowerShell (e.g. Trailer documents, Trailer attachments).
The procedure to edit configuration objects does not depend on the object type. It is the same for all
object types.
CmdLet Description
Get- Loads the specified object/s from the configuration and saves it e.g. in a local variable.
Afterwards, the object can be edited by using properties or functions on the object.
New- Creates a new empty object locally.
Remove- Is used to delete an object over its ID or its display name in the configuration.
Only the Remove- CmdLet does not require Save-.
Save- After a Get- or New-, Save- is used to save the changed or new object in the configuration.
3.1 Get-iQ
Syntax:
Get-iQ
This CmdLet ‘gets’ one or more objects from the configuration (e.g. Trailer document or fingerprint)
and writes them on the console or in a variable.
Example:
Get-iQTrailerDocument
When the Get- CmdLet is called without parameters, always all objects are got and displayed
according to the used CmdLet via iQ.Suite WebClient:
http://www.gbs.com/
GBS www.gbs.com Page 15
The Get- CmdLet can be called with the following parameters:
Parameter Description Example
ID ID of the corresponding configuration object.
Return: 0 or 1 object
89
Displayname Name(s) of the corresponding configuration objects (case-
insensitive string comparison).
Return: 0 bis n objects
Legal
Example:
Get-iQTrailerDocument –ID -6 | fl Displayname, ID
Get-iQTrailerDocument –Displayname "Sender Signature" | fl Displayname, ID
http://www.gbs.com/
GBS www.gbs.com Page 16
The parameters ID or DisplayName can be passed also as default parameter (without specifying the
parameter) directly to the CmdLet.
Example (Displayname):
Get-iQTrailerDocument "Sender Signature" | fl Displayname, ID
Example (ID):
Get-iQTrailerDocument -6 | fl Displayname
3.2 New-iQ
Syntax:
New-iQ
This CmdLet creates a new (‘empty’) object of the corresponding CmdLet type (e.g.
TrailerAttachment or FingerPrint) without saving it in the configuration.
Objects created with New- can be processed locally in the PowerShell. A ‘piping’ in the Save- CmdLet
allows to save the created objects in the configuration. As a parameter, the DisplayName must always
be provided (required parameter).
Example:
$fp = New-iQFingerPrint –DisplayName "Test"
http://www.gbs.com/
GBS www.gbs.com Page 17
New-iQFingerPrint creates a new fingerprint. This is saved directly in the $fp variable via which the
fingerprint can be further processed.
The ‘empty’ ID (i.e. ID without value) indicates that this object has not been saved per
Save-iQFingerPrint in the configuration and thereby only exists ‘locally’ in this PowerShell session.
Use the -Verbose parameter for additional logging of the action on the console:
$fp = New-iQFingerPrint -Displayname "Test" -Verbose
3.3 Save-iQ
Syntax:
Save-iQ
This CmdLet saves a local object in the configuration. You have to always use the pipeline for this.
Example:
$fp = New-iQFingerPrint –DisplayName "Test"
$fp | Save-iQFingerPrint
http://www.gbs.com/
GBS www.gbs.com Page 18
Use the -Verbose parameter for additional logging of the action on the console:
$fp | Save-iQFingerPrint -Verbose
http://www.gbs.com/
GBS www.gbs.com Page 19
3.4 Remove-iQ
Syntax:
Remove-iQ
This CmdLet removes an object from the configuration. No further call of the Save- CmdLet is
required.
The object can be specified via the parameter ID or DisplayName, or it is passed to the CmdLet by
using the pipeline (e.g. with Get- CmdLet).
Like with the Get- CmdLet, the values ID and DisplayName can also be directly passed as default
parameters (see example below).
Parameter Description Example
ID ID of the corresponding configuration object.
Return: 0 or 1 object
89
Displayname Finds all configuration objects with display names which begin with
(e.g. “Legal”). This search is case-insensitive.
Return: 0 till n objects
Legal
Example:
$fp = Get-iQFingerPrint 31
Remove-iQFingerPrint 31
http://www.gbs.com/
GBS www.gbs.com Page 20
Important: No security query is done before deletion! For a security query to be done, use the
PowerShell option -Confirm:
Remove-iQFingerPrint 31 -Confirm
The PowerShell option -WhatIf is supported as well:
Remove-iQFingerPrint 31 -WhatIf
http://www.gbs.com/
GBS www.gbs.com Page 21
Use the -Verbose parameter for additional logging of the action on the console:
Remove-iQFingerPrint 33 -Verbose
http://www.gbs.com/
GBS www.gbs.com Page 22
4 Open/Close PowerShell Session
4.1 Open-iQSession
The Open-iQSession CmdLet opens a PowerShell session to edit objects.
Editing objects is done by means of other CmdLets which are described in the following chapters.
Important Parameters:
Parameter Description Example
BaseUri HTTP basic address of iQ.Suite WebClient http://localhost:8099
Username WebClient username kardev\msxts2.1
Password Password of the WebClient user
The password must be passed as ‘SecureString’!
TimeoutSeconds Command timeout in seconds
Timeout for all HTTP requests to the WebClient back-end.
600
Example:
$user="dgaller"
$url="http://localhost:8099"
$password_sec = Read-Host "Please enter a password" -AsSecureString
Please enter a password: *****
Open-iQSession -BaseUri $url -Username $user -Password $password_sec -TimeoutSeconds 600 –Verbose
http://www.gbs.com/
GBS www.gbs.com Page 23
4.2 Close-iQSession
The Close-iQSession CmdLet closes the current session. Afterwards, no objects can be processed
anymore.
Close-iQSession -Verbose
http://www.gbs.com/
GBS www.gbs.com Page 24
5 Getting Help for CmdLets
For a help of PowerShell in general, please refer to the Microsoft documentation:
https://docs.microsoft.com/de-de/powershell/scripting/getting-started/fundamental/getting-detailed-
help-information?view=powershell-5.1
In this chapter, the most important help possibilities are described with the iQ.Suite-specific CmdLet
Get-iQTransportJob as an example.
5.1 Help about a PowerShell CmdLet
To call the help for PowerShell CmdLets, use the get-help CmdLet or set “ -?” after the CmdLet.
Example:
get-help get-iQTransportJob
or
get-iQTransportJob -?
5.2 Help about the ‘Get-Help’ CmdLet
To get help about the get-help CmdLet, type:
get-help get-help
5.3 List of all CmdLet Help Topics
To get a list of all the CmdLet help topics in your session, type:
get-help -category cmdlet
http://www.gbs.com/https://docs.microsoft.com/de-de/powershell/scripting/getting-started/fundamental/getting-detailed-help-information?view=powershell-5.1https://docs.microsoft.com/de-de/powershell/scripting/getting-started/fundamental/getting-detailed-help-information?view=powershell-5.1
GBS www.gbs.com Page 25
5.4 Detailed Information about a CmdLet
To display detailed information about a CmdLet, function, or script, including descriptions of its
parameters and examples of use, type the detailed parameter.
Example:
get-help get-iQTransportJob -detailed
5.5 All Content of a Help Topic
To display all content in the help topic, use the full parameter.
Example:
get-help get-iQTransportJob -full
5.6 Help about the Parameters of a CmdLet
To get detailed help about the parameters of a CmdLet, use the parameter parameter.
Example:
get-help get-iQTransportJob -parameter *
http://www.gbs.com/
GBS www.gbs.com Page 26
5.7 Examples of a Help Topic
To display only the examples in a help topic, use the examples parameter.
Example:
get-help get-iQTransportJob -examples
http://www.gbs.com/
GBS www.gbs.com Page 27
6 General CmdLets
6.1 Get-iQGeneralTimezones
This CmdLet returns the available time zones in iQ.Suite WebClient as a list of objects of the
Timezone type.
Parameter Mandatory Type Description
Substring
(Implizit)
No string Search string for finding a specific time zone. Can be passed
without any explicit parameter.
Examples:
6.2 Object ‘Timezone’
http://www.gbs.com/
GBS www.gbs.com Page 28
Available properties:
■ DisplayName: Display name of the time zone
■ Id: ID string of the time zone
■ OffsetMinutes: Offset in minutes related to UTC
http://www.gbs.com/
GBS www.gbs.com Page 29
7 CmdLets for Mail Transport Jobs
With the TransportJob CmdLets, iQ.Suite Mail Transport Jobs of the configuration can be displayed
and enabled/disabled. An object of type JobBase is used.
Description of the object type JobBase:
The following CmdLets are available:
■ Get-iQTransportJob
■ Save-iQTransportJob
In this version of PowerShell Provider, there is no possibility to delete jobs or to create new ones.
With Get-iQTransportJob, you can save some JobBase objects, e.g. in a variable.
http://www.gbs.com/
GBS www.gbs.com Page 30
The properties of the JobBase object are also available in the iQ.Suite administration console and in
iQ.Suite WebClient:
Property Edita-
ble
Type1 Description
CheckMailsResendFromQuarantine No Bool Field in iQ.Suite administration console:
Comment No String Comment
DisplayName No String Display name
Enabled Yes Bool Job enabled or disabled
ID No Int Unique ID of the job
IgnoreMailsProcessedByServers No Bool Field in iQ.Suite administration console:
IsMissionCritical No Bool Is job mission-critical?
LastModifiedDate No Date Last modified date.
Is set only after saving with Save-.
Priority No Int Priority of the job in the job chain
ProcessNotifications No Bool Field in iQ.Suite administration console:
VerboseProcessingLog No Bool Field in iQ.Suite administration console:
1 Bool = Boolean; Int = Integer
http://www.gbs.com/
GBS www.gbs.com Page 31
7.1 Task: Enable Mail Transport Jobs
$job = Get-iQTransportJob 134
$job.Enabled = $true
$job | Save-iQTransportJob
7.2 Task: Disable Mail Transport Jobs
$job = Get-iQTransportJob 134
$job.Enabled = $false
$job | Save-iQTransportJob
http://www.gbs.com/
GBS www.gbs.com Page 32
http://www.gbs.com/
GBS www.gbs.com Page 33
8 CmdLets for FingerPrints
8.1 Categories for Fingerprints
To edit FingerprintCategories, the following CmdLets are available:
■ Get-iQFingerPrintCategory
■ New-iQFingerPrintCategory
■ Save-iQFingerPrintCategory
■ Remove-iQFingerPrintCategory
The general handling is described in chapter 3.
All FingerPrintCategory CmdLets work on an object of type FingerPrintCategory:
The following properties are available for this object:
Property Editable Type Description
Displayname Yes String Display name
ID No Int Unique ID of the fingerprint category.
Is set only after saving with Save-.
LastModifiedDate No Date Last modified date.
Is set only after saving with Save-.
8.1.1 Task: Create Fingerprint Category
$cat = New-iQFingerPrintCategory "MyNewImageCat"
$cat | Save-iQFingerPrintCategory
http://www.gbs.com/
GBS www.gbs.com Page 34
8.1.2 Task: Change Fingerprint Category
$cat = Get-iQFingerPrintCategory "NewFingerPrintCat"
$cat.Displayname = "MyNewImageCat2"
$cat | Save-iQFingerPrintCategory
8.1.3 Task: Delete Fingerprint Category
Remove-iQFingerPrintCategory "MyNewImageCat" -Verbose
http://www.gbs.com/
GBS www.gbs.com Page 35
8.2 Fingerprints
To edit fingerprints, the following CmdLets are available:
■ Get-iQFingerPrint
■ New-iQFingerPrint
■ Save-iQFingerPrint
■ Remove-iQFingerPrint
The general handling is described in chapter 3.
All FingerPrint CmdLets work on an object of type FingerPrint.
Description of the object type FingerPrint:
When saving an existing or new fingerprint in a variable by using Get-FingerPrint or
New-FingerPrint, the fingerprint can be changed via properties or methods on this object.
The properties correspond to those which exist in the iQ.Suite administration console and in iQ.Suite
WebClient (see table below). When setting the properties, plausibility checks are performed as well.
Property Edita-
ble
Type2 Description
AllMustMatch Yes Bool
AllowedCharacters Yes String Set the Allowed characters field per HEX string.
2 Bool = Boolean; Int = Integer
http://www.gbs.com/
GBS www.gbs.com Page 36
Property Edita-
ble
Type2 Description
AllowedCharactersASCII Yes String Set the Allowed characters field per ASCII string.
Categories Yes List List of the fingerprint categories in which the fingerprint
is contained.
Comment Yes String Comment
DisplayName Yes String Display name
HasBinaryPattern No Bool true = Fingerprint has binary patterns
false = Fingerprint has no binary patterns
Is set only after saving with Save-
ID No Int Unique ID of the fingerprint.
Is set only after saving with Save-
Jobs No List
(strings)
List of the job names in which the fingerprint is used.
LastModifiedDate No Datum Last modified date.
Is set only after saving with Save-
NamePattern Yes String
http://www.gbs.com/
GBS www.gbs.com Page 37
Function Description
AddBinaryDataFromASCII( int StartPos,
int EndPos, string ASCIIString )
Add a new binary pattern to the fingerprint.
Parameters:
■ StartPos: Start position of the binary pattern
■ EndPos: End position of the binary pattern
ASCIIString: Binary search pattern in ASCII characters
AddBinaryDataFromHex( int StartPos,
int EndPos, string HexString )
See AddBinaryDataFromASCII
HexString: Binary search pattern in HEX characters
RemoveBinaryDataByID( int ID ) Removes the binary pattern with the ID of the fingerprint.
Parameter:
ID: ID of the binary pattern
GetBinaryDataByID( int ID ) Searches the binary pattern with the ID in the fingerprint,
writes the object to the console or in variable.
Parameter:
ID: ID of the binary pattern
AddCategory( string CategoryName ) Adds the fingerprint to the fingerprint category
CategoryName (case-insensitive search).
Note: Only the categories which are already saved in the
configuration can be used here.
RemoveCategory( string CategoryName ) Adds the fingerprint to the fingerprint category
CategoryName (case-insensitive search).
Note: Only the categories which are already saved in the
configuration can be used here.
ClearCategories() Removes the fingerprint from all categories.
In the following sections, typical tasks are described.
http://www.gbs.com/
GBS www.gbs.com Page 38
8.2.1 Task: Change Display Name of a Fingerprint
$fp = New-iQFingerPrint "Test"
$fp.DisplayName = "New Test"
$fp | Save- iQFingerPrint
8.2.2 Task: Change Allowed Characters
You can change allowed characters either via the AllowCharacters or AllowedCharactersASCII
property.
While AllowCharacters only accepts hexadecimal values, AllowedCharactersASCII accepts ASCII
characters. When setting one of these values, the other value is always calculated as well.
Example:
$fp Get-iQFingerPrint 36
$fp.AllowedCharactersASCII="TEST"
$fp.AllowedCharacters="ADAD"
$fp | Save-iQFingerPrint
http://www.gbs.com/
GBS www.gbs.com Page 39
http://www.gbs.com/
GBS www.gbs.com Page 40
8.2.3 Task: Change Name Patterns
$fp = Get-iQFingerPrint 36
$fp.NamePattern = "*doc;*.txt"
http://www.gbs.com/
GBS www.gbs.com Page 41
8.2.4 Task: Change ‘All fingerprint criteria have to match’
$fp = Get-iQFingerPrint 36
$fp.AllMustMatch=$false
$fp | Save-iQFingerPrint
8.2.5 Task: Display/Change Binary Patterns
Example: Display binary patterns
$fp = Get-iQFingerPrint "OpenOffice Spreadsheet Document (*.ods)"
$fp.BinaryPatterns
http://www.gbs.com/
GBS www.gbs.com Page 42
Example: Delete binary patterns
$fp.BinaryPatterns
$fp.RemoveBinaryDataByID(-266)
$fp | Save-iQFingerPrint
http://www.gbs.com/
GBS www.gbs.com Page 43
Example: Add binary patterns
$fp.BinaryPatterns
$fp.AddBinaryDataFromASCII(1,5,"TEST")
$fp | Save-iQFingerPrint
http://www.gbs.com/
GBS www.gbs.com Page 44
Example: Change binary patterns
$bin = $fp.GetBinaryDataByID(-267)
$bin.ASCIIValue="TEST"
$fp | Save-iQFingerPrint
http://www.gbs.com/
GBS www.gbs.com Page 45
Example: Change binary patterns without ID
$bin = $fp.BinaryPatterns[1]
$bin.ASCIIValue="222"
$fp | Save-iQFingerPrint
http://www.gbs.com/
GBS www.gbs.com Page 46
8.2.6 Task: Change Categories
Example: Add category
$fp.AddCategory("archive")
Example: Delete category
$fp.RemoveCategory("archive")
http://www.gbs.com/
GBS www.gbs.com Page 47
Example: Clear all categories
$fp.ClearCategories()
http://www.gbs.com/
GBS www.gbs.com Page 48
9 CmdLets for Trailer Documents
To edit fingerprints, the following CmdLets are available:
■ Get-iQTrailerDocument
■ New-iQTrailerDocument
■ Save-iQTrailerDocument
■ Remove-iQTrailerDocument
The general handling is described in chapter 3.
All TrailerDocument CmdLets work on the object of type iQTrailerDocument.
Description of the object type iQTrailerDocument:
When saving an existing or new Trailer document in a variable by using Get-iQTrailerDocument or
New-iQTrailerDocument, the Trailer document can be changed via properties on this object.
The properties correspond to those which exist in the iQ.Suite administration console and in iQ.Suite
WebClient (see table below). When setting the properties, plausibility checks are performed as well.
http://www.gbs.com/
GBS www.gbs.com Page 49
Property Edita-
ble
Type3 Description
Comment Yes String Comment
DisplayName Yes String Display name
Enabled Yes Bool Trailer document enables/disabled
EndDate Yes String End date in case of time-limited use.
Editable only if LimitValidity = $True.
HTMLContent Yes String HTML content of the Trailer document.
If ModifyPlainText = $false, ModifyPlainText is
automatically filled when this property is set.
ID No Int Unique ID of the Trailer document.
Is set only after saving with Save-
Jobs No List of
dtrings
List of the job names in which the Trailer document is used.
LastModifiedDate No Date Last modified date.
Is set only after saving with Save-
LimitValidity Yes Bool Enabling/Disabling time-limited use
ModifyPlainText Yes Bool Enabling/Disabling manual editing of PlainTextContent
PlainTextContent Yes String Plain-text content of the Trailer document.
Editable only if ModifyPlainText = $true
RTFFromHTML Yes Bool Possible values:
$true: RTF Trailer is generated from HTMLContent.
$false: RTF Trailer is generated from PlainTextContent.
StartDate Yes String Start date in case of time-limited use.
Editable only if LimitValidity = $True
3 Int = Integer; Bool = Boolean
http://www.gbs.com/
GBS www.gbs.com Page 50
9.1 Task: Create Trailer Document
$doc = New-iQTrailerDocument -DisplayName "NewDoc1"
$doc | Save-iQTrailerDocument -Verbose
9.2 Task: Load HTML Content from a File
$doc = Get-iQTrailerDocument "NewDoc1"
$doc.HTMLContent = Get-Content("D:\temp\trailer.html")
http://www.gbs.com/
GBS www.gbs.com Page 51
9.3 Task: Change Plain-Text Content
$doc.ModifyPlainText = $true
$doc.PlainTextContent = "Hallo"
$doc | Save-iQTrailerDocument
9.4 Task: Set Time-Limited Use
$doc = Get-iQTrailerDocument -1
$doc.LimitValidity=$true
$doc.StartDate = "17.05.2017"
$doc.EndDate = "20.05.2017"
$doc | Save-iQTrailerDocument
http://www.gbs.com/
GBS www.gbs.com Page 52
When setting the time limit, please note the following:
■ StartDate and EndDate are editable only if LimitValidity is set to $true.
■ When setting StartDate and EndDate, the times are ignored.
■ Trailer images
http://www.gbs.com/
GBS www.gbs.com Page 53
10 CmdLets for Trailer Images
10.1 Categories for Trailer Images
To edit categories for Trailer images, the following CmdLets are available:
■ Get-iQ TrailerImageCategory
■ New-iQ TrailerImageCategory
■ Save-iQ TrailerImageCategory
■ Remove-iQ TrailerImageCategory
The general handling is described in chapter 3.
All TrailerImageCategory CmdLets work on the object of type TrailerImageCategory.
Description of the object type TrailerImageCategory:
The following properties on this object are available:
Property Editable Type4 Description
DisplayName Yes String Display name
ID No Int Unique ID of the category for Trailer images.
Is set only after saving with Save-
LastModifiedDate No Datum Last modified date.
Is set only after saving with Save-
4 Int = Integer
http://www.gbs.com/
GBS www.gbs.com Page 54
10.1.1 Task: Create Category for Trailer Images
$cat = New-iQTrailerImageCategory "Cat1"
$cat | Save-iQTrailerImageCategory
10.1.2 Task: Change Category for Trailer Images
$cat = Get-iQTrailerImageCategory "Cat1"
$cat.Displayname = "Cat2"
$cat | Save-iQTrailerImageCategory
10.1.3 Task: Remove Category for Trailer Images
Remove-iQTrailerImageCategory "Cat1" -Verbose
http://www.gbs.com/
GBS www.gbs.com Page 55
10.2 Trailer Images
To edit Trailer images, the following CmdLets are available:
■ Get-iQTrailerImage
■ Save-iQTrailerImage
■ Remove-iQTrailerImage
The general handling is described in chapter 3.
Since two different types of Trailer images exist (‘conventional’ and ‘personalized’), there are also two
object types: TrailerImage and TrailerImagePersonal.
10.2.1 Conventional Trailer Images
To create new conventional Trailer images, use the following CmdLet:
■ New-iQTrailerImage:
(like in iQ.Suite administration console: TRAILER -> ALL TRAILER IMAGES -> NEW -> TRAILER IMAGE).
Description of the object type TrailerImage:
When saving an existing or new Trailer image in a variable by using Get-iQTrailerImage or
New-iQTrailerImage, the Trailer image can be changed via properties and methods on this object.
http://www.gbs.com/
GBS www.gbs.com Page 56
The properties correspond to those which exist in the iQ.Suite administration console and in iQ.Suite
WebClient (see table below). When setting the properties, plausibility checks are performed as well.
Property Editable Type5 Description
AttachmentName Yes String Name of the Trailer attachment
Category Yes TrailerImageCategory If applicable, category which contains the
Trailer image.
Comment Yes String Comment
Data No List of bytes Byte data of the saved image
DisplayName Yes String Display name
Documents No List von Strings List of the Trailer documents in which the
image is used.
Format No TrailerImageFormat
Possible values:
GIF, JPG, PNG
Is automatically set when image is uploaded.
Height No Int Height of the image (in pixel)
ID No Int Unique ID of the image.
Is set only after saving with Save-
LastModifiedDate No Datum Last modified date.
Is set only after saving with Save-
Size No Int Size of the image (in Byte)
Type No TrailerImageType
Possible values:
Standard, Personal
Value depends on the object type of the
Trailer image:
Conventional Trailer image: Standard
Personalized Trailer image: Personal
Here always value = Standard
5 Int = Integer
http://www.gbs.com/
GBS www.gbs.com Page 57
Width No Int Width of the image in pixel.
Method Description
LoadImage( string Filename ) Loads an image from the file to the TrailerImage object.
Filename: Source filename of an image file
SaveImage( string Filename ) Saves the image contained in the TrailerImage object to a file.
Filename: Target filename of an image file
10.2.1.1 Task: Load Image File in TrailerImage Object
$img.LoadImage("D:\temp\embedded_32.gif")
$img | Save-iQTrailerImage
10.2.1.2 Task: Save Image from TrailerImage Object to File
$img = Get-iQTrailerImage 7
$img.SaveImage("D:\temp\downloaded.gif")
http://www.gbs.com/
GBS www.gbs.com Page 58
10.2.1.3 Task: Set Name of Trailer Attachment
$img = Get-iQTrailerImage NewImage1
$img.AttachmentName = "NewImage1.gif"
$img | Save-iQTrailerImage
http://www.gbs.com/
GBS www.gbs.com Page 59
10.2.1.4 Task: Set in Category (Move)
$cat = Get-iQTrailerImageCategory Cat1
$img = Get-iQTrailerImage MewImage1
$img.Category = $cat
$img | Save-iQTrailerImage
10.2.1.5 Task: Delete from a Category
$img = Get-iQTrailerImage MewImage1
$img.Category = $null
$img | Save-iQTrailerImage
http://www.gbs.com/
GBS www.gbs.com Page 60
10.2.2 Personalized Trailer Images
To create new personalized Trailer images, use the following CmdLet:
■ New-iQTrailerImagePersonal
(like in iQ.Suite administration console: TRAILER -> ALL TRAILER IMAGES -> NEW -> PERSONALIZED
TRAILER IMAGE).
Description of the object type TrailerImagePersonal:
When saving an existing or new Trailer image in a variable by using Get-iQTrailerImage or
New-iQTrailerImagePersonal, the personalized Trailer image can be changed via properties on this
object.
http://www.gbs.com/
GBS www.gbs.com Page 61
The properties correspond to those which exist in the iQ.Suite administration console and in iQ.Suite
WebClient (see table below). When setting the properties, plausibility checks are performed as well.
Property Edita-
ble
Type Description
ADFieldName Yes String Name of the field in the Active Directory
(AD).
Default value when creating a new one:
thumbnailPhoto
AttachmentName Yes String Attachment name.
Default value when creating a new
personalized image:
personal_image.jpg
Category Yes TrailerImageCategory If applicable, category which contains the
Trailer image.
Comment Yes String Comment
DefaultImage Yes TrailerImage Default image in case the AD is not found or
is not set.
The Trailer image must have a valid ID, i.e.
must have been saved at least once.
DisplayName Yes String Display name
Documents No List of strings List of the Trailer documents in which the
image is used.
Format Yes TrailerImageFormat
Possible values:
GIF, JPG, PNG
Image format of the image in the AD field.
Default when a new image is created:
JPG
Height No int Height of the image (in pixel).
Is automatically set from the DefaultImage.
ID No Int Unique ID of the image.
Is set only after saving with Save-
http://www.gbs.com/
GBS www.gbs.com Page 62
Property Edita-
ble
Type Description
IgnoreDimensions Yes
(restric-
ted)
Bool Should the dimensions of the default image
be ignored?
Editable only if the Trailer image is not used
in any Trailer document.
LastModifiedDate No Date Last modified date.
Is set only after saving with Save-
Type No TrailerImageType
Possible values:
Standard, Personal
Value depends on the object type of the
Trailer image:
Conventional Image: Standard
Personalized Image: Personal
Here always value = Personal
Width No Int Width of the image in pixel.
Is automatically set from the DefaultImage.
10.2.2.1 Task: Create Personalized Trailer Image
$img_pers = New-iQTrailerImagePersonal "MyNewPersImage"
$img_pers | Save-iQTrailerImagePersonal
http://www.gbs.com/
GBS www.gbs.com Page 63
10.2.2.2 Task: Set Default Image
$def_img = Get-iQTrailerImage Logo
$img_pers = New-iQTrailerImagePersonal "MyNewPersImage"
$img_pers.DefaultImage = $def_img
$img_pers | Save-iQTrailerImage
10.2.2.3 Task: Set Format
$img_pers = Get-iQTrailerImage "MyNewPersImage"
$img_pers.Format = "PNG"
$img_pers | Save-iQTrailerImage
http://www.gbs.com/
GBS www.gbs.com Page 64
10.2.2.4 Task: Set ‘Ignore image dimensions’
Only possible if the image is not used in any Trailer document.
$img_pers = Get-iQTrailerImage "MyNewPersImage"
$img_pers.IgnoreDimensions = $true
$img_pers | Save-iQTrailerImage
10.2.2.5 Task: Set Attachment Name and ‘Active Directory’ Field Name
$img_pers = Get-iQTrailerImage "MyNewPersImage"
$img_pers.ADFieldName = "MySuperADField"
$img_pers.AttachmentName = "MySuperAttachmentld"
$img_pers | Save-iQTrailerImage
http://www.gbs.com/
GBS www.gbs.com Page 65
10.2.2.6 Task: Set in Category (Move)
Refer to 10.2.1.4.
10.2.2.7 Task: Remove from a Category
Refer to 10.2.1.5.
http://www.gbs.com/
GBS www.gbs.com Page 66
11 CmdLets for Trailer Attachments
11.1 Categories for Trailer Attachments
To edit categories for Trailer attachments, the following CmdLets are available:
■ Get-iQTrailerAttachmentCategory
■ New-iQTrailerAttachmentCategory
■ Save-iQTrailerAttachmentCategory
■ Remove-iQTrailerAttachmentCategory
The general handling is described in chapter 3.
All TrailerAttachmentCategory CmdLets work on an object of type TrailerAttachmentCategory.
Description of the object type TrailerAttachmentCategory:
The following properties are available for this object:
Property Editable Type6 Description
DisplayName Yes String Display name
ID No Int Unique ID of the category for Trailer attachments
Is set only after saving with Save-
LastModifiedDate No Datum Last modified date
Is set only after saving with Save-
6 Int = Integer
http://www.gbs.com/
GBS www.gbs.com Page 67
11.1.1 Task: Create Category for Trailer Attachments
$cat = New-iQTrailerAttachmentCategory "AttaCat1"
$cat | Save-iQTrailerAttachmentCategory
11.1.2 Task: Change Category for Trailer Attachments
$cat = Get-iQTrailerAttachmentCategory "AttaCat1"
$cat.DisplayName = "AttaCat2"
$cat | Save-iQTrailerAttachmentCategory
11.1.3 Task: Remove Category for Trailer Attachments
Remove-iQTrailerAttachmentCategory "AttaCat2" -Verbose
http://www.gbs.com/
GBS www.gbs.com Page 68
11.2 Trailer Attachments
To edit Trailer attachments, the following CmdLets are available:
■ Get-iQTrailerAttachment
■ Save-iQTrailerAttachment
■ Remove-iQTrailerTrailerAttachment
To create new Trailer attachments, the following CmdLets are available:
■ New-iQTrailerAttachment: Creates a new conventional Trailer attachment
(like in iQ.Suite administration console: TRAILER -> ALL TRAILER ATTACHMENTS -> NEW -> TRAILER
ATTACHMENT).
■ New-iQTrailerAttachmentBinary: Creates a new binary Trailer attachment
(like in iQ.Suite administration console: TRAILER -> ALL TRAILER ATTACHMENTS -> NEW -> TRAILER
ATTACHMENT (BINARY)).
■ New-iQTrailerAttachmentVCard: Creates a new Trailer attachment of type ‘vCard’
(like in iQ.Suite administration console: TRAILER -> ALL TRAILER ATTACHMENTS -> NEW -> TRAILER
ATTACHMENT VCARD).
The general handling is described in chapter 3.
Since three different types of Trailer attachments exist (‘conventional’, ‘binary’ and ‘vCard’), there are
also three object types:
■ TrailerAttachment
■ TrailerAttachmentBinary
■ TrailerAttachmentVCard
http://www.gbs.com/
GBS www.gbs.com Page 69
11.2.1 Conventional Trailer Attachments
Description of the object type TrailerAttachment:
When saving an existing or new Trailer attachment in a variable by using Get-iQTrailerAttachment
or New-iQTrailerAttachment, the Trailer attachment can be changed via properties on this object.
The properties correspond to those which exist in the iQ.Suite administration console and in iQ.Suite
WebClient (see table below). When setting the properties, plausibility checks are performed as well.
Property Editable Type7 Description
AttachmentName Yes String Name of the Trailer attachment.
Default value when creating a new
one: text.txt
Category Yes TrailerAttachmentCategory If applicable, category which
contains the Trailer attachment.
Comment Yes String Comment
Content Yes String Content of the Trailer attachment
ContentType Yes ContentType
Possible values:
VCard, Custom
Content type of the Trailer
attachment:
CustomContentType Yes
(restricted)
String User-defined content type of the
Trailer attachment:
7 Int = Integer
http://www.gbs.com/
GBS www.gbs.com Page 70
Property Editable Type7 Description
Only editable if ContentType is set
to ‘Custom’.
DisplayName Yes String Display name
Documents No List of strings List of the Trailer documents in
which the attachment is used as QR
Code image
(see ProvideAsQRCode).
ID No Int Unique ID of the image.
Is set only after saving with Save-
Jobs No List of strings List of the Trailer jobs in which the
attachment is used.
LastModifiedDate No Date Last modified date.
Is set only after saving with Save-
ProvideAsQRCode Yes
(restricted)
Bool Provide attachment content also as
QR Code image in Trailer
documents?
Editable only if Trailer attachment is
not used in any Trailer document.
Type No TrailerAttachmentType
Possible values:
Standard, Binary, VCard
Value depends on the object type of
the Trailer attachment:
■ conventional: Standard
■ binary: Binary
■ vCard: VCard
Here always value = Standard
http://www.gbs.com/
GBS www.gbs.com Page 71
11.2.1.1 Task: Create Trailer Attachment
$atta = New-iQTrailerAttachment "Atta"
$atta.Content = "This is the Content"
$atta | Save-iQTrailerAttachment
11.2.1.2 Task: Change User-Defined Content Type
$atta = Get-iQTrailerAttachment "Atta"
$atta.CustomContentType = "myCustomContentType"
$atta | Save-iQTrailerAttachment
http://www.gbs.com/
GBS www.gbs.com Page 72
11.2.1.3 Task: Change Content Type
$atta = Get-iQTrailerAttachment "Atta"
$atta.ContentType = "VCard"
$atta | Save-iQTrailerAttachment
http://www.gbs.com/
GBS www.gbs.com Page 73
http://www.gbs.com/
GBS www.gbs.com Page 74
11.2.1.4 Task: Provide Text as QR Code Image in Trailer Documents
$atta = get-iQTrailerAttachment "New Trailer Attachment"
$atta.ProvideAsQRCode=$true
$atta | Save-iQTrailerAttachment
http://www.gbs.com/
GBS www.gbs.com Page 75
11.2.1.5 Task: Set in Category (Move)
$cat = Get-iQTrailerAttachmentCategory "Cat1"
$atta = Get-iQTrailerAttachment "Atta"
$atta.Category = $cat
$atta | Save- iQTrailerAttachment
11.2.1.6 Task: Remove from a Category
$atta = Get-iQTrailerAttachment "Atta"
$atta.Category = $null
$atta | Save- iQTrailerAttachment
http://www.gbs.com/
GBS www.gbs.com Page 76
11.2.2 Binary Trailer Attachments
Description of the object type TrailerAttachmentBinary:
When saving an existing or new binary Trailer attachment in a variable by using
Get-iQTrailerAttachment or New-iQTrailerAttachmentBinary, the binary Trailer attachment can
be changed via properties and functions on this object.
The properties correspond to those which exist in the iQ.Suite administration console and in iQ.Suite
WebClient (see table below). When setting the properties, plausibility checks are performed as well.
Property Editable Type8 Description
AttachmentName Yes String Attachment name
Default value when creating a new one:
text.txt
Category Yes TrailerAttachmentCategory If applicable, category which contains
the Trailer attachment.
Comment Yes String Comment
ContentType Yes ContentTypeBinary
Possible values:
Binary, Custom
Content type of the binary Trailer
attachment:
CustomContentType Yes
(restric-
ted)
String User-defined content type of the binary
Trailer attachment:
8 Int = Integer
http://www.gbs.com/
GBS www.gbs.com Page 77
Property Editable Type8 Description
Editable only if ContentType is set to
‘Custom’.
Default value:
application/octet-stream
Data No List of bytes Binary data of the attachment
DisplayName Yes String Display name
ID No Int Unique ID of the image.
Is set only after saving with Save-
Jobs No List of strings List of the Trailer jobs in which the
attachment is used.
LastModifiedDate No Datum Last modified date.
Is set only after saving with Save-
Type No TrailerAttachmentType
Possible values:
Standard
Binary
VCard
Value depends on the object type of the
Trailer attachment:
Conventional: Standard
Binary: Binary
vCard: VCard
Here always value = Binary
Methods which can be executed on the TrailerAttachmentBinary object:
Method Description
LoadFile( string Filename ) Loads the content from a file to the Data field of the
TrailerAttachmentBinary object.
Filename: Source filename
SaveFile( string Filename ) Saves the content of the Data field of the TrailerAttachmentBinary
object to a file.
Filename: Target filename
http://www.gbs.com/
GBS www.gbs.com Page 78
11.2.2.1 Task: Create Binary Trailer Attachment with Loading a File Content
$atta_bin = New-iQTrailerAttachmentBinary "myAttaBin"
$atta_bin.LoadFile("D:\temp\Projektantrag.docx")
$atta_bin | Save-iQTrailerAttachment
http://www.gbs.com/
GBS www.gbs.com Page 79
11.2.2.2 Task: Change Attachment Name and (User-Defined) Content Type
$atta_bin = Get-iQTrailerAttachment 9
$atta_bin.AttachmentName = "Antrag"
$atta_bin.ContentType = "Custom"
$atta_bin.CustomContentType = "application/msword"
$atta_bin | Save-iQTrailerAttachment
11.2.2.3 Task: Save Content of a Binary Trailer Attachment to a File
$atta_bin = Get-iQTrailerAttachment 9
$atta_bin.SaveFile("D:\temp\Antrag.docx")
http://www.gbs.com/
GBS www.gbs.com Page 80
11.2.2.4 Task: Set in Category (Move)
Refer to 11.2.1.5.
11.2.2.5 Task: Remove from a Category
Refer to 11.2.1.6.
http://www.gbs.com/
GBS www.gbs.com Page 81
11.2.3 Trailer Attachments of Type ‘vCard’
Description of the object type TrailerAttachmentVCard:
When saving an existing or new Trailer vCard attachment in a variable by using
Get-iQTrailerAttachment or New-iQTrailerAttachmentVCard, the Trailer vCard attachment can
be changed via properties and functions on this object.
The properties correspond to those which exist in the iQ.Suite administration console and in iQ.Suite
WebClient (see table below). When setting the properties, plausibility checks are performed as well.
Property Editable Type9 Description
ActiveVCardFields No List of objects of type
TrailerAttachmentVCardField
List of all active vCard fields
AllVCardFields No List of objects of type
TrailerAttachmentVCardField
List of all configured vCard fields
AttachmentName Yes String Attachment name
Default value when creating a
new vCard attachment:
vCardTemplate.vcf
Category Yes TrailerAttachmentCategory If applicable, category of the
Trailer attachment.
Comment Yes String Comment
Content No String vCard text
9 Int = Integer
http://www.gbs.com/
GBS www.gbs.com Page 82
Property Editable Type9 Description
Is always automatically
calculated from the
ActiveVCardFields.
DisplayName Yes String Display name
Documents No List von Strings List of the Trailer documents in
which the attachment is used as
QR code image.
ID No Int Unique ID of the image
Is set only after saving with
Save-.
InactiveVCardFields No List of objects of the type
TrailerAttachmentVCardField
List of all inactive vCard fields
Jobs No List of strings List of the Trailer jobs in which
the attachment is used.
LastModifiedDate No Date Last modified date.
Is set only after saving with
Save-
ProvideAsQRCode Yes
(restricted)
Bool Provide attachment content also
as QR code image in Trailer
documents?
Editable only if Trailer
attachment of type ‘vCard’ is not
used in any Trailer document.
Type No TrailerAttachmentType
Possible values:
Standard
Binary
VCard
Value depends on the object
type of the Trailer attachment:
Conventional: Standard
Binary: Binary
vCard: VCard
Here always value = VCard
http://www.gbs.com/
GBS www.gbs.com Page 83
Method Description
ActivateAllVCardFields () Enables all vCard fields
(see AllVCardFields field)
ActivateVCardField(string Fieldname) Enables vCard fields with the name Fieldname
(see AllVCardFields field)
DeactivateAllVCardFields() Disables all vCard fields
(see AllVCardFields field)
DeactivateVCardField(string Fieldname) Disables vCard fields with the name Fieldname
(see AllVCardFields field)
11.2.3.1 Task: Create vCard Attachment
$atta_vcard = New-iQTrailerAttachmentVCard "MyAttaVCard"
$atta_vcard.AttachmentName = "My Super Attachment Name"
$atta_vcard | Save-iQTrailerAttachment
11.2.3.2 Task: Enable Individual vCard Fields
$atta_vcard = Get-iQTrailerAttachment –DisplayName "New Trailer Attachment vCard 1"
$atta_vcard.ActivateVCardField("Title")
$atta_vcard | Save-iQTrailerAttachment
http://www.gbs.com/
GBS www.gbs.com Page 84
11.2.3.3 Task: Enable All vCard Fields
$atta_vcard.activateAllVCardFields()
$atta_vcard | Save-iQTrailerAttachment
http://www.gbs.com/
GBS www.gbs.com Page 85
11.2.3.4 Task: Disable Individual vCard Fields
$atta_vcard.DeactivateAllVCardFields("Photo")
$atta_vcard | Save-iQTrailerAttachment
11.2.3.5 Task: Disable All vCard Fields
$atta_vcard.DeactivateAllVCardFields()
$atta_vcard | Save-iQTrailerAttachment
http://www.gbs.com/
GBS www.gbs.com Page 86
11.2.3.6 Task: Provide Text as QR Code Image in Trailer Documents
Refer to 11.2.1.4.
11.2.3.7 Task: Set in Category (Move)
Refer to 11.2.1.5.
11.2.3.8 Task: Remove from Category
Refer to 11.2.1.6.
http://www.gbs.com/
GBS www.gbs.com Page 87
12 CmdLets for Active Directory
In this chapter, you will find a description of the CmdLets which can be used to query Active Directory
groups, users and contacts. Only existing Active Directory elements can be queried. It is not possible
to create new elements or delete existing elements.
The following CmdLets can be used:
■ Get-iQDirectoryGroups: All Active Directory groups or only the ones with a defined prefix are
returned.
■ Get-iQDirectoryUsers: All Active Directory users or only the ones with a defined prefix are
returned.
■ Get-iQDirectoryContacts: All Active Directory contacts or only the ones with a defined prefix
are returned.
■ Get-iQDirectoryUsersByGroups: All Active Directory users of a given group are returned.
12.1 Parameter
Parameter Mandatory Type Description
Prefix No String This parameter is used to filter the Directory elements. Only
elements with names or email addresses which begin with
the pre