Server Configuration Portal Scripting Guide - Version 2021.1
Copyright © 2021, Ivanti. All Rights Reserved. Terms of Use
Page 12 of 29
Use the Initialize-ApsDatabase cmdlet to create a product database:
PS C:\> Initialize-ApsDatabase -DatabaseServer "SQLSERVER\Instance" -DatabaseNam
e ManagementServer –ConfigurerCredential $configurerAccount -ServiceCredential
$serviceAccount –DatabaseConnection "NewConnection" –Verbose
VERBOSE: Starting Initialize-ApsDatabase
VERBOSE: DatabaseServer: SQLSERVER\Instance
VERBOSE: DatabaseName: ManagementServer
VERBOSE: DatabaseConnection: NewConnection
VERBOSE: Initialize-ApsDatabase: Connecting to database 'ManagementServer'
VERBOSE: Initialize-ApsDatabase: Applying latest database schema
VERBOSE: Initialize-ApsDatabase: Applying default configuration to database
'ManagementServer'
VERBOSE: Initialize-ApsDatabase: Creating database login 'serviceAccount' of type
'Impersonate' for web directory and Windows services access
VERBOSE: Initialize-ApsDatabase: Setting web directories to use new database login
VERBOSE: Completed Initialize-ApsDatabase
Note If the –ConfigurerCredential is not supplied then Initialize-ApsDatabase cmdlet will default to
using Windows Impersonation. On completion the DatabaseConnection.xml will not contain the
configurer credentials. This can be fixed within the Server Configuration Portal.
Once a database has been created, then the server can be created using the Initialize-ApsServer cmdlet. The
DatabaseServer, DatabaseName, ConfigurerCredential, and ServiceAccount parameters can all be specified
again, or instead, the DatabaseConnection parameter can be used by specifying the name of the
DatabaseConnection created during the Initialize-ApsDatabase step.
PS C:\> Initialize-ApsServer –DatabaseConnection "NewConnection" –Verbose
VERBOSE: Starting Initialize-ApsServer
VERBOSE: WebsiteName: Management
VERBOSE: WebsiteAuthentication: Windows
VERBOSE: DatabaseServer: SQLSERVER\Instance
VERBOSE: DatabaseName: ManagementServer
VERBOSE: DatabaseConnection: NewConnection
VERBOSE: ConnectionString:
VERBOSE: InstallMode:
VERBOSE: Initialize-ApsServer: Loading recommendations
VERBOSE: Initialize-ApsServer: Creating application pools
VERBOSE: Initialize-ApsServer: Applying application pool defaults
VERBOSE: Initialize-ApsServer: Creating and initializing IIS directories
VERBOSE: Initialize-ApsServer: Applying web directory defaults
VERBOSE: Initialize-ApsServer: Creating database login 'serviceAccount' of type
'Impersonate' for web directory and Windows services access
VERBOSE: Initialize-ApsServer: Setting web directories to use new database login
VERBOSE: Initialize-ApsServer: Registering and starting Windows services
VERBOSE: Initialize-ApsServer: Applying service defaults
VERBOSE: Initialize-ApsServer: Setup complete
VERBOSE: Completed Initialize-ApsServer