Set-TssDatabaseConfiguration
SYNOPSIS
Set the database configuration
SYNTAX
Set-TssDatabaseConfiguration [-TssSession] <Session> [-AuthenticationType <String>]
[-ConnectionTimeout <Int32>] [-DatabaseName <String>] [-EnableMultiSubnetFailover] [-EnableSslEncryption]
[-FailoverPartner <String>] [-FileOverridePassword <SecureString>] [-FileOverrideUserName <String>]
[-Password <SecureString>] [-ServerName <String>] [-TrustServerCertificate] [-UserName <String>] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Updates the SQL Server connection settings Secret Server uses and returns the updated configuration. Secret Server validates the new connection before it saves it. With SQL Server authentication, send the Password parameter even when the password is not changing. A wrong value can take Secret Server offline. Only the parameters you pass are sent; switch parameters send their value, so -Name:$false turns a setting off. The database configuration is set per web node: the change applies only to the node that receives the request, so the session must point directly at that node, not at a load-balanced address. The command writes that warning and asks OK to proceed? before it sends the request. -Force skips the question, and the confirmation prompt unless -Confirm is passed, for unattended runs; -WhatIf shows the request without sending it.
EXAMPLES
EXAMPLE 1
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
Set-TssDatabaseConfiguration -TssSession $session -EnableSslEncryption -TrustServerCertificate:$false
Encrypt the database connection and validate the SQL Server certificate
PARAMETERS
-TssSession
TssSession object created by New-TssSession for authentication
Type: Session
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-AuthenticationType
How Secret Server authenticates to SQL Server
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ConnectionTimeout
Connection timeout in seconds
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-DatabaseName
Database name
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-EnableMultiSubnetFailover
Use multi-subnet failover (availability groups)
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-EnableSslEncryption
Encrypt the connection to SQL Server
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-FailoverPartner
Failover partner server
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-FileOverridePassword
Password of the -FileOverrideUserName account
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-FileOverrideUserName
Windows account used to write the database configuration file on the web server
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Password
SQL Server login password, used with SQL Server authentication
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ServerName
SQL Server name, or server\instance
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-TrustServerCertificate
Trust the SQL Server certificate without validating its chain
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-UserName
SQL Server login name, used with SQL Server authentication
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Force
Skip the OK to proceed? question, and the confirmation prompt unless -Confirm is passed. The warning is still written.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
Thycotic.PowerShell.Configuration.DatabaseConfiguration
NOTES
Requires TssSession object returned by New-TssSession
Secret Server on-premises only (the endpoint is blocked in Secret Server Cloud).