Set-CMDatabaseProperty

Changes database settings for a Configuration Manager database.

Syntax

Set-CMDatabaseProperty
   [-Confirm]
   [-DataRetentionDays <Int32>]
   [-DisableWildcardHandling]
   [-EnableDataCompression <Boolean>]
   [-ForceWildcardHandling]
   [-SiteCode <String>]
   [-SqlServerServiceBrokerPort <Int32>]
   [-WhatIf]
   [<CommonParameters>]

Description

The Set-CMDatabaseProperty cmdlet changes database settings for a Microsoft System Center Configuration Manager site database. Specify the Configuration Manager site code for the database that you want to modify.

You can modify whether the database uses data compression, the Service Broker port for the computer that runs Microsoft SQL Server, and the length of time that the database keeps data. You can use the Get-CMDatabaseProperty cmdlet to see current values for these properties.

Examples

Example 1: Change settings for a database

PS C:\> Set-CMDatabaseProperty -SiteCode "CM2" -DataRetentionPeriodDays 10 -EnableDataCompression $False -SqlServerServiceBrokerPort 80

This command makes changes to the database for the site that has the site code CM2. The command sets the data retention period to 10 days, disables data compression, and specifies a port for the SQL Server Service Broker.

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DataRetentionDays
Type:Int32
Aliases:DataRetentionPeriodDays
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

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

Specifies whether the database uses data compression.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

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

Specifies the site code for a Configuration Manager site.

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

Specifies the port that the computer running SQL Server uses as a Service Broker port.

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