Skip to main content
SnapCenter 4.7 cmdlets

Remove-SmProtectResource

Contributors

This command helps remove the protection for the resources.

Syntax

Remove-SmProtectResource [-Resources]  <Hashtable[]>  [-Force]  <>  [-UnmanageOnly]  <>

Detailed Description

Remove-SmProtectResource removes the protection for the resources provided.

Parameters

Name Description Required? Pipeline Input Default Value

Resources

The list of protected resources from which protection will be removed.You must provide the resource information in a hashtable, and it must contain the resource name and type, as well as the host on which the resource is located. For example,@{"Host"="localhost";"Type"="SQL Database";"Names"="Instance\Database"}Valid Type values are: SQL Database, SQL Instance, SQL Availability Group.You can include comma-separated values for Names. For Oracle Database, the format is -Resources @{"Host"="host.example.com";"Oracle Database"="db1"}. For Oracle Application Volume, the format is -Resources @{"Host"="host.example.com";"Application Volume"="appVol1"}.

true

true (ByPropertyName)

Force

The force flag indicates that the protection will be deleted even if it has an associated policy and backup.

false

true (ByPropertyName)

UnmanageOnly

false

true (ByPropertyName)

Examples

Example 1: Removes the protection of the resources

 Remove-SmProtectResource  -Resources @{"Host"="test.mycompany.com";"Type"="SQLDatabases";"Names"="test\SQLExpress\inst1"},@{"Host"="test.mycompany.com";"Type"="SQLDatabases";"Names"="test\SQLExpress\inst2"}  -Force

This example syntax removes the protection of the two resources

Remove-SmProtectResource
Are you sure you want to delete the Protection of the selected resource?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):

Example 1: Removes the protection of the resources without confirmation dialogue

 Remove-SmProtectResource  -Resources @{"Host"="test.mycompany.com";"Type"="SQLDatabases";"Names"="test\SQLExpress\inst1"},@{"Host"="test.mycompany.com";"Type"="SQLDatabases";"Names"="test\SQLExpress\inst2"}  -Force -Confirm:$false

This example syntax removes the protection of the two resources

Example 3: Unprotecting a single volume

 Remove-SmProtectResource -Resources @{"Type"="StorageVolume";"ResourceGuids"="f37b4bae-72a2-48b3-8504-7cc8eef15031";}

Example 4: Unprotecting multiple volumes

 Remove-SmProtectResource -Resources @{"Type"="StorageVolume";"ResourceGuids"="f37b4bae-72a2-48b3-8504-7cc8eef15031,b806a86a-1374-4be1-bb83-fc0d33947a97";}

Example 5: Removes the protection of the Oracle Application Volume resources

 Remove-SmProtectResource -Resources @(@{"Host"="R8092776CF4V1.HNK2.com";"Application Volume"="appVol1"},@{"Host"="R8092776CF4V1.HNK2.com";"Application Volume"="appVol2"})

This example syntax removes the protection of the two Oracle application volume resources

Remove-SmProtectResource
Are you sure you want to delete the Protection of the selected resource?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):