Get-DPMAutoProtectIntent
Gets the auto-protection setting for a SQL Server instance.
Syntax
DPMServer (Default)
Get-DPMAutoProtectIntent
[[-DPMServerName] <String>]
[-SQLInstanceName] <String>
[<CommonParameters>]
ProtectionGroup
Get-DPMAutoProtectIntent
[-SQLInstanceName] <String>
[-ProtectionGroup] <ProtectionGroup>
[<CommonParameters>]
Description
The Get-DPMAutoProtectIntent cmdlet gets the System Center - Data Protection Manager (DPM) auto-protection setting 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 see the current settings for auto-protection, specify the SQL Server instance, and either the protection group that it belongs to or the name of a DPM server.
Possible states returned are:
NotPresent = SQLInstance specified was Not Found. Be sure to use MachineName\InstanceName syntax.
Enabled = Auto Protect is enabled.
Disabled = Auto Protect is not enabled.
Examples
1. Get Auto Protect of DPM Server SQL Instance
PS C:\>Get-DPMAutoProtectIntent -SQLInstance "DPMServer01\MSDPMINSTANCE" -DPMServername DPMServer01
This command will list one of the possible states of auto protect for SQL instance name DPMServer01\MSDPMINSTANCE on the DPM Server named DPMServer01.
2: Get Auto Protect of Production Server SQL Instance in Protection Group
PS C:\>$Pgroup=Get-ProtectionGroup
PS C:\>$Pgroup
PS C:\>Get-DPMAutoProtectIntent -SQLInstance "SQLServer01\SQLSINSTANCE" -ProtectionGroup $Pgroup[x]
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).
The third command will list one of the possible states of auto protect for SQL instance name SQLServer01\SQLINSTANCE for the $Pgroup member number [x] you selected.
Parameters
-DPMServerName
Specifies the name of a DPM server on which this cmdlet acts.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | ComputerName, CN |
Parameter sets
DPMServer
Position: | 2 |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ProtectionGroup
Specifies a protection group for which this cmdlet gets a setting. To obtain a ProtectionGroup object, use the Get-DPMProtectionGroup cmdlet.
Parameter properties
Type: | ProtectionGroup |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ProtectionGroup
Position: | 2 |
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: | 1 |
Mandatory: | True |
Value from pipeline: | True |
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.