Share via


Set-DPMAutoProtectIntent

Turns DPM auto-protection on or off for a SQL Server instance.

Syntax

Default (Default)

Set-DPMAutoProtectIntent
    [-ProtectionGroup] <ProtectionGroup>
    [-SQLInstanceName] <String[]>
    [-AutoProtectIntent] <AutoProtectionIntent>
    [-AutoProtectCloudIntent] <Enable/Disable>
    [-ProductionServer] <ProductionServer>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-DPMAutoProtectIntent cmdlet turns System Center - Data Protection Manager (DPM) auto-protection on or off for a Microsoft SQL Server data management software instance. When you use auto-protection for a SQL Server instance, DPM identifies and protects new databases added to that instance. To change the auto-protection setting, specify the SQL Server instance, the protection group that it belongs to, and a production server.

When you first add a SQL Server instance to a protection group, the DPM server enables auto-protection for that instance.

Examples

1: Enable SQL Auto protection for SQL Instance in a protection group.

PS C:\>$Pgroup=Get-ProtectionGroup
PS C:\>$Pgroup
PS C:\>$ProductionServers = get-productionserver
PS C:\ >$ProductionServers
PS C:\>Set-DPMAutoProtectIntent -Protectiongroup $Pgroup[x] -SQLInstancename "SQLSERVER01\SQLREPORTING" -AutoProtectIntent enable -ProductionServer $ProductionServers[x]
PS C:\> Get-DPMAutoProtectIntent -SQLInstance "SQLSERVER01\SQLREPORTING" -ProtectionGroup $Pgroup[x]
Enabled

The first command gets the protection group(s) from Data Protection Manager (DPM) server. The command stores the protection group in the $PGroup variable.

The second command list the Protection group(s) for later reference

The third command gets the productions servers that have an Agent installed

The fourth command lists the Production Server(s) for later reference.

The fifth command enabled SQL Auto protect in the protection group member number [x] you selected for the SQL instance “SQLSERVER01\SQLREPORTING” hosted on the ProductionServers member number [x] you selected.

The sixth command verifies the state of auto sql protection for the SQL instance "SQLSERVER01\SQLREPORTING" for the protection group member number [x] you selected.

Parameters

-AutoProtectCloudIntent

Specifies whether the commandlet turns Cloud auto-protection on or off. If set to Enable, all the datasources set to auto-protection to disk in the Protection Group will be auto-protected to cloud. If set to Disable, auto-protection to cloud will cease.

The acceptable values for this parameter are: Enable and Disable.

Parameter properties

Type:AutoProtectCloudIntent
Default value:Disable
Supports wildcards:False
DontShow:False

Parameter sets

Enable
Position:4
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Disable
Position:4
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AutoProtectIntent

Specifies whether the cmdlet turns auto-protection on or off.

The acceptable values for this parameter are: Enable and Disable.

Parameter properties

Type:AutoProtectionIntent
Default value:None
Accepted values:Enable, Disable
Supports wildcards:False
DontShow:False

Parameter sets

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
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

-ProductionServer

Specifies a computer on which a DPM protection agent is installed.

Parameter properties

Type:ProductionServer
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-ProtectionGroup

Specifies a protection group on which this cmdlet operates. To obtain a ProtectionGroup object, use the Get-DPMProtectionGroup cmdlet.

Parameter properties

Type:ProtectionGroup
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-SQLInstanceName

Specifies the name of a SQL Server instance in the form of Machinename\InstanceName as seen in the protection group.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:True
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:SwitchParameter
Default value:False
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.