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.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies a friendly name for the setting.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Server
Specifies the server associated with the setting.
Type: | Microsoft.SystemCenter.Foundation.SPFData.Types.Server |
Position: | Named |
Default value: | None |
Required: | True |
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: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SettingType
Specifies either DatabaseConnectionString or EndPointConnectionString.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Value
Specifies the value for the setting.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
System.Object