New-CMSqlServerSetting

New-CMSqlServerSetting

Creates a SQL Server settings object in Configuration Manager.

Syntax

Parameter Set: NewSqlServerSettingsbyCopy
New-CMSqlServerSetting -CopySqlServerExpressOnSecondarySite [-SqlServerServiceBrokerPort <Int32> ] [-SqlServerServicePort <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewSqlServerSettingsbyExisting
New-CMSqlServerSetting -SiteDatabaseName <String> -UseExistingSqlServerInstance [-InstanceName <String> ] [-SqlServerServiceBrokerPort <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The New-CMSqlServerSetting cmdlet creates a Microsoft SQL Server settings object in Microsoft System Center 2012 Configuration Manager. The object specifies settings for the name of the site database and the port number for the SQL Server service and SQL Server Service Broker.

Parameters

-CopySqlServerExpressOnSecondarySite

Specifies that Microsoft SQL Server Express is copied to a secondary site.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InstanceName<String>

Specifies the name of an instance of SQL Server.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SiteDatabaseName<String>

Specifies a name of the Configuration Manager site database.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SqlServerServiceBrokerPort<Int32>

Specifies a port number for the SQL Server Service Broker port.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SqlServerServicePort<Int32>

Specifies a port number for the SQL Server service port.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UseExistingSqlServerInstance

Indicates that you use the existing instance of SQL Server.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

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.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Create a SQL Server settings object

This command creates a SQL Server settings object that specifies that System Center 2012 Configuration Manager copies Microsoft SQL Server Express to a secondary site. The command specifies that System Center 2012 Configuration Manager use port 4037 for the SQL Server Service Broker.

PS C:\> New-CMSqlServerSetting -CopySqlServerExpressOnSecondarySite -SqlServerServiceBrokerPort 4037