New-SCSpfSetting

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

Syntax

New-SCSpfSetting
   [-Name <String>]
   -Value <String>
   -SettingType <String>
   -Server <Server>
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-SCSpfSetting
   [-Name <String>]
   -Value <String>
   -SettingType <String>
   -ServerName <String>
   [-WhatIf]
   [-Confirm]
   [<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.

Required Parameters

-Server

Specifies the server associated with the setting.

Type:Server
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SettingType

Specifies either DatabaseConnectionString or EndPointConnectionString.

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

Specifies the value for the setting.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

Specifies a friendly name for the setting.

Type:String
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
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False