New-CMSqlServerSetting

Creates a SQL Server settings object in Configuration Manager.

Syntax

New-CMSqlServerSetting
   [-InstanceName <String>]
   -SiteDatabaseName <String>
   [-SqlServerServiceBrokerPort <Int32>]
   [-UseExistingSqlServerInstance]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CMSqlServerSetting
   [-CopySqlServerExpressOnSecondarySite]
   [-SqlServerServiceBrokerPort <Int32>]
   [-SqlServerServicePort <Int32>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-CMSqlServerSetting cmdlet creates a Microsoft SQL Server settings object in 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.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Create a SQL Server settings object

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

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

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-CopySqlServerExpressOnSecondarySite

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

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

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

-InstanceName

Specifies the name of an instance of SQL Server.

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

-SiteDatabaseName

Specifies a name of the Configuration Manager site database.

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

-SqlServerServiceBrokerPort

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

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

-SqlServerServicePort

Specifies a port number for the SQL Server service port.

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

-UseExistingSqlServerInstance

Indicates that you use the existing instance of SQL Server.

Type:SwitchParameter
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 doesn't run.

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

Inputs

None

Outputs

IResultObject

IResultObject[]