Share via


New-SCSPFSetting

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

Syntax

FromSettingServerSettingTypeParameterSetName (Default)

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

FromSettingServerNameSettingTypeParameterSetName

New-SCSPFSetting
    -Value <String>
    -SettingType <String>
    -ServerName <String>
    [-Name <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.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies a friendly name for the setting.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Server

Specifies the server associated with the setting.

Parameter properties

Type:Microsoft.SystemCenter.Foundation.SPFData.Types.Server
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromSettingServerSettingTypeParameterSetName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromSettingServerNameSettingTypeParameterSetName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SettingType

Specifies either DatabaseConnectionString or EndPointConnectionString.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Value

Specifies the value for the setting.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

System.Object