New-SCSpfSetting

Creates a new setting for a database connection or a portal endpoint.

Syntax

New-SCSpfSetting [-Confirm] [-Name <String>] -Server <Server> -SettingType <String> -Value <String> [-WhatIf]
 [<CommonParameters>]
New-SCSpfSetting [-Confirm] [-Name <String>] -ServerName <String> -SettingType <String> -Value <String>
 [-WhatIf] [<CommonParameters>]

Description

The New-SCSPFSetting cmdlet creates a new setting for a database connection string or a portal endpoint connection string.

Examples

Example 1: Create a new setting for a database connection

PS C:\>$Setting = New-SCSPFSetting -Name "ContosoSetting" -SettingType "DatabaseConnectionString" -SettingString "Server=ContosoServer\\ContosoInstance;Database=OperationsManagerDW;TrustedConnection=True;Connection Timeout=300" -Server $ContosoServer

This command creates a new setting for a database connection. The setting is associated with the server stored in the $ContosoServer variable, which was previously obtained by using the Get-SCSPFServer cmdlet.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies a friendly name for the setting.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Server

Specifies the server associated with the setting.

Type:Server
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServerName

Specifies the name of the server the setting is associated with. The actual association is made by the Server parameter with a server object.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SettingType

Specifies either DatabaseConnectionString or EndPointConnectionString.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Value

Specifies the value for the setting.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False