Skip to main content
SnapCenter 4.9 cmdlets

Get-SmResources

Contributors

Discovers plug-in resources.

Syntax

Get-SmResources [-PluginCode]  <PluginCode>  [-HostName]  <String>  [-UseKnownResources]  <SwitchParameter>  [-AppObjectType]  <String>  [-AppObjectId]  <String>  [-IsDAG]  <SwitchParameter>  [-InformationAction]  <ActionPreference>  [-InformationVariable]  <String>  [-WhatIf]  <SwitchParameter>  [-Confirm]  <SwitchParameter>

Detailed Description

Discovers plug-in resources. For SnapCenter Plug-in for Microsoft SQL Server, resources include databases, Availability Groups, and SQL Server instances. You can query one host at a time and return information about any plug-in instances installed on that host. You can use this cmdlet to get detailed information about resources located on the specified host.For SnapCenter Plug-in for Oracle Database, resources include Oracle databases and application volumes This is useful for creating appropriate disk and SMB shares and to include resources in datasets for later data protection.If a request times out when running this cmdlet, you can add the following rest timeout value key to the out from PowerShell config file located at "C:\Windows\System32\WindowsPowerShell\v1.0\Modules\SnapCenter\SnapManager.PSModule.dll.config": <add key="RESTTimeout" value="10800000" />

Parameters

Name Description Required? Pipeline Input Default Value

PluginCode

The name of the plug-in for which you want to discover resources. Possible inputs include SCSQL, SCW, SCO, HANA, SCU, SCE, and SP.

true

true (ByPropertyName)

HostName

Specifies the host name. You can query one host at a time.

true

true (ByPropertyName)

UseKnownResources

Indicates that you want to return the cached resources. You can use this parameter when you have already queried resources from the SnapCenter GUI. In this case, you receive information only about the already discovered resources. You can use this parameter for resource verification.Oracle application volume resources are manually created by the user. These resources will always be obtained from the SnapCenter database because discovery on host is not applicable for them.

false

true (ByPropertyName)

AppObjectType

Specifies the type of application object. For example, instance, database, or a SAP HANA SingleContainer or MultipleContainers. For SnapCenter Plug-in for Oracle Database, valid object types are Database and ApplicationVolume.

false

true (ByPropertyName)

AppObjectId

Specifies the AppObjectId of resource. For example, -AppObjectId MVA-RX200-S13\SQLEXPRESS\DB16. For Oracle databases and application volume resources, the ID is of the format HostName\ResourceName.

false

true (ByPropertyName)

IsDAG

Required parameter that enables SnapCenter to discover Microsoft Exchange Database Availability Groups (DAGs) when you use the SnapCenter Plug-in for Microsoft Exchange Server.

false

true (ByPropertyName)

WhatIf

false

false

Confirm

false

false

DatabaseName

SAP HANA database name.

false

true (ByValue, ByPropertyName)

ListStorageFootprint

false

true (ByValue, ByPropertyName)

SID

This is a SAP HANA database specific parameter. A SAP HANA system is identified by aunique 3 letter system ID (SID). For example, ABC.

false

true (ByValue, ByPropertyName)

ResourceType

Specifies the type of application object. For example, instance, database, or a SAP HANA SingleContainer or MultipleContainers.

false

true (ByValue, ByPropertyName)

TenantDatabaseName

This is a SAP HANA database specific parameter. It is the name of the tenant database for SAP HANA Multitenant Database.

false

true (ByValue, ByPropertyName)

ResourceName

This can be used to filter resources by their names

false

true (ByValue, ByPropertyName)

Examples

Example 1: Discovering resources on a host

 Get-SmResources -HostName 'vise-f6.sddev.mycompany.com' -PluginCode MSFT_SQL

This example syntax discovers the resources for the Microsoft SQL plug-in on the specified host.

PluginCode OperationResults
---------- ----------------
MSFT_SQL {SMCoreContracts.SmObjectOperationResult, SMCoreContract…​

Example 2: Listing storage content of custom DB2 plugin resource

 Get-SmResources -HostName 'sccorelinux61.sccore.test.com' -PluginCode DB2 -AppObjectName financeDB -ListStorageFootprint

This example syntax lists resource details along with StorageFoot print details of the custom plug-in resource named financeDB of DB2.

Completed Discovering resources: Job Id [123]
ResourceName : financeDB
ResourceVersion  :
ResourceId   : sccorelinux61.sccore.test.com\Db2\financeDB
ResourceType : Instance
Protected: No
RunAsName:
ResourceSettings :
MountPaths   :
StorageFootPrint : StorageResourceType : SDStorageDir, StorageResource : financeDB :/vol/SM1_SRC_sccorelinux61_sccore_test_com

Example 3: Listing SAP HANA databases of type SingleContainer

 Get-SmResources -HostName 'scspr0204312001.gdl.englab.netapp.com' -PluginCode hana -AppObjectType SingleContainer

This example syntax lists all SAP HANA databases of resource type SingleContainer.

Completed Discovering Resources: Job Id [564]
DatabaseName : NonMDC6
SID  : LMN
UserStoreKeys: bG1uOGfG3efS1yJZQMqOttTQH5C283MUtNTlOHUlIYhUbAH+zBtCpXAr/v89mO2Is9IoQuNKjOOGeKD/iv4vYaP+2hK0VNM8YOf8zAU58u24RZGTrLjcLZX0OeH0JwPgGZ5Ljml629LkU7ArBMfWXokq6Q==
FileBackupPath   : /hana/shared/LMN/HDB01/backup/data
FileBackupPrefix : SnapCenter_
OSDBUser :
ResourceId   : scspr0204312001.gdl.englab.netapp.com\hana\LMN
ResourceUid  : LMN
PluginName   : hana
Host : scspr0204312001.gdl.englab.netapp.com
ResourceType : SingleContainer
Protected: No
RunAsName:
ResourceSettings :
MountPaths   :

Example 4: Listing SAP HANA databases of type Multitenant Database Container

 Get-SmResources -HostName 'scspr0204312001.gdl.englab.netapp.com' -PluginCode hana -AppObjectType MultipleContainers

This example syntax lists SAP HANA databases of resource type MultipleContainers.

Completed Discovering Resources: Job Id [565]
DatabaseName   : NewRes1
SID: BGB
UserStoreKeys  : YmdiOd9V1LuiyloAsPoQhXb1I32XN8mu4kmsXUT1eWA/wsEBIr0YbxAniqNQCWPJxot/bw24xEfTr1IUOuP8wXGP4t/DluFo4HfNIYIpEAQ9BuK9ehMQagGY9DwbsvtTrrueVzPCi0E4LAfV4+WsLdLaow==
FileBackupPath : /hana/shared/PPP/HDB01/backup/data
FileBackupPrefix   : SnapCenter_
OSDBUser   :
TenantDatabaseName : hhh
TenantType : SingleTenant
ResourceId : scspr0204312001.gdl.englab.netapp.com\hana\BGB\hhh
ResourceUid: BGB\hhh
PluginName : hana
Host   : scspr0204312001.gdl.englab.netapp.com
ResourceType   : MultipleContainers
Protected  : No
RunAsName  :
ResourceSettings   :
MountPaths :

Example 5: Listing all SAP HANA resources of specified host

 Get-SmResources -PluginCode 'hana' -HostName 'schana02.gdl.englab.netapp.com' -UseKnownResources

This example lists all the SAP HANA databases of a selected host.

Completed Discovering Resources: Job Id [21]
DatabaseName: R57
SID : R57
UserStoreKeys   : cjU3uItRwnENhBzpUwKFGMsPL+sWzrS0LwLvh+BVhDJEh+hxGEBF00tcKka6ElLUjyXEPDULjXdVqw6GmlkIr+UuIa4Zq+pnGKlt0zRbM6E1ZxE8k6r8HElNgHrjY3JUsUvBS7RNQlOirVC6R2n93Qfd9A==
FileBackupPath  :
FileBackupPrefix: SnapCenter_
OSDBUser: r57adm
TenantDatabaseNames : {R57, TDB01, TDB02, TDB03}
TenantType  : MultiTenant
ResourceId  : schana02.gdl.englab.netapp.com\hana\MDC\R57
ResourceUid : MDC\R57
PluginName  : hana
Host: schana02.gdl.englab.netapp.com
ResourceType: MultipleContainers
Protected   : No
RunAsName   :
ResourceSettings:
MountPaths  :
DiscoveryType   : Auto
IsAuthenticated : Yes
DatabaseName: MDC
SID : MT1
UserStoreKeys   : bXQxDY8049rvqv2jPtrmFNChtY9CuhhNBSnsSJ9Fzo13LYquhwnlDknOd+QeJepEFFSIEX0AxRFcYnQVm1RR5Ky2P3oi2vgEUrPqe0UoHkfBe/QgjDeeaIrBIr4CNIiXZVwKFxOm0oLxXcf4Uluo/amAhw==
FileBackupPath  :
FileBackupPrefix: SnapCenter_
OSDBUser: root
TenantDatabaseNames : {}
TenantType  : MultiTenant
ResourceId  : schana02.gdl.englab.netapp.com\hana\MDC\MT1
ResourceUid : MDC\MT1
PluginName  : hana
Host: schana02.gdl.englab.netapp.com
ResourceType: MultipleContainers
Protected   : No
RunAsName   :
ResourceSettings:
MountPaths  :
DiscoveryType   : Manual
IsAuthenticated : Not Applicable
DatabaseName : NonMDC_SN
SID  : H01
UserStoreKeys: aDAx85jqzWC0G9U7i7ohDgG1VxG7E8AxaUKyD2BeRnv+fF3sluc9aZDdPUyaWgJwQ5ZAAe0IPBY/l1PGkli2DgffnbhPjwu9fPg+nKhlErLyjXp26txx+CJJWHAniekIAsJxLdc9aUrcKO4Xm5N2wdNgdQ==
FileBackupPath   :
FileBackupPrefix : SnapCenter_
OSDBUser : user
ResourceId   : schana02.gdl.englab.netapp.com\hana\H01
ResourceUid  : H01
PluginName   : hana
Host : schana02.gdl.englab.netapp.com
ResourceType : SingleContainer
Protected: No
RunAsName:
ResourceSettings :
MountPaths   :
DiscoveryType: Manual
IsAuthenticated  : Not Applicable

Example 6: Listing all the resources of a specified resource type

 Get-SmResources -PluginCode 'hana' -HostName 'schana02.gdl.englab.netapp.com' -UseKnownResources -ResourceType 'MultipleContainers' -DatabaseName 'R57'

This example lists all the resources of a specified resource type.

Completed Discovering Resources: Job Id [47]
DatabaseName   : R57
SID: R57
UserStoreKeys  :
FileBackupPath :
FileBackupPrefix   : SnapCenter_
OSDBUser   :
TenantDatabaseName :
TenantType : MultiTenant
ResourceId : schana02.gdl.englab.netapp.com\hana\MDC\R57
ResourceUid: MDC\R57
PluginName : hana
Host   : schana02.gdl.englab.netapp.com
ResourceType   : MultipleContainers
Protected  : No
RunAsName  :
ResourceSettings   :
MountPaths :
DiscoveryType  : Auto
IsAuthenticated: No

Example 7: Trigger plug-in discovery and list the resources of specified host

 Get-SmResources -PluginCode 'hana' -HostName 'schana02.gdl.englab.netapp.com' -UseKnownResources:$false

This example syntax lists all resources of specified host.

Completed Discovering Resources: Job Id [21]
DatabaseName: R57
SID : R57
UserStoreKeys   : cjU3uItRwnENhBzpUwKFGMsPL+sWzrS0LwLvh+BVhDJEh+hxGEBF00tcKka6ElLUjyXEPDULjXdVqw6GmlkIr+UuIa4Zq+pnGKlt0zRbM6E1ZxE8k6r8HElNgHrjY3JUsUvBS7RNQlOirVC6R2n93Qfd9A==
FileBackupPath  :
FileBackupPrefix: SnapCenter_
OSDBUser: r57adm
TenantDatabaseNames : {R57, TDB01, TDB02, TDB03}
TenantType  : MultiTenant
ResourceId  : schana02.gdl.englab.netapp.com\hana\MDC\R57
ResourceUid : MDC\R57
PluginName  : hana
Host: schana02.gdl.englab.netapp.com
ResourceType: MultipleContainers
Protected   : No
RunAsName   :
ResourceSettings:
MountPaths  :
DiscoveryType   : Auto
IsAuthenticated : Yes
DatabaseName: MDC
SID : MT1
UserStoreKeys   : bXQxDY8049rvqv2jPtrmFNChtY9CuhhNBSnsSJ9Fzo13LYquhwnlDknOd+QeJepEFFSIEX0AxRFcYnQVm1RR5Ky2P3oi2vgEUrPqe0UoHkfBe/QgjDeeaIrBIr4CNIiXZVwKFxOm0oLxXcf4Uluo/amAhw==
FileBackupPath  :
FileBackupPrefix: SnapCenter_
OSDBUser: root
TenantDatabaseNames : {}
TenantType  : MultiTenant
ResourceId  : schana02.gdl.englab.netapp.com\hana\MDC\MT1
ResourceUid : MDC\MT1
PluginName  : hana
Host: schana02.gdl.englab.netapp.com
ResourceType: MultipleContainers
Protected   : No
RunAsName   :
ResourceSettings:
MountPaths  :
DiscoveryType   : Manual
IsAuthenticated : Not Applicable
DatabaseName : NonMDC_SN
SID  : H01
UserStoreKeys: aDAx85jqzWC0G9U7i7ohDgG1VxG7E8AxaUKyD2BeRnv+fF3sluc9aZDdPUyaWgJwQ5ZAAe0IPBY/l1PGkli2DgffnbhPjwu9fPg+nKhlErLyjXp26txx+CJJWHAniekIAsJxLdc9aUrcKO4Xm5N2wdNgdQ==
FileBackupPath   :
FileBackupPrefix : SnapCenter_
OSDBUser : user
ResourceId   : schana02.gdl.englab.netapp.com\hana\H01
ResourceUid  : H01
PluginName   : hana
Host : schana02.gdl.englab.netapp.com
ResourceType : SingleContainer
Protected: No
RunAsName:
ResourceSettings :
MountPaths   :
DiscoveryType: Manual
IsAuthenticated  : Not Applicable

Example 8: Listing the resources for given sid and resource type

 Get-SmResources -HostName 'schana02.gdl.englab.netapp.com' -PluginCode hana -ResourceType MultipleContainers -UseKnownresources -SID 'R57' -DatabaseName 'R57'

This example lists all the resources of a specified host.

Completed Discovering Resources: Job Id [1692]
DatabaseName: R57
SID : R57
UserStoreKeys   : cjU3YuC1vIPicEl3zD+B6o/fev9RR0vicLMY9+9iW3DGz0WN1WiAVHFywsnSJh3vlksKbR75f2klpfhgkI27yTZPxuja5HqHsTQVrW6ZITfirN9hfM61sHeI38LSBNNaKLCsfU4kk6Okk6QzZL+RVtht1g==
FileBackupPath  :
FileBackupPrefix: SnapCenter_
OSDBUser: r57adm
TenantDatabaseNames : {R57, TDB01, TDB02, TDB03}
TenantType  : MultiTenant
ResourceId  : schana02.gdl.englab.netapp.com\hana\MDC\R57
ResourceUid : MDC\R57
PluginName  : hana
Host: schana02.gdl.englab.netapp.com
ResourceType: MultipleContainers
Protected   : No
RunAsName   :
ResourceSettings:
MountPaths  :
DiscoveryType   : Auto
IsAuthenticated : Yes

Example 8: Get details of the specified resource using AppObjectId

 Get-SmResources -PluginCode 'SCSQL' -HostName 'schana02.gdl.englab.netapp.com' -AppResourceId 'MVA-RX200-S13\SQLEXPRESS\DB16'

This example syntax displays the details of the resources (including cloud protection).

DBName: DB16
			DBVersion : 11.0.2100
			DBId  : MVA-RX200-S13\SQLEXPRESS\DB16
			DBType: SQL Database
			Protected : Yes
			OverallStatus :
			CloudProtected: Yes
			CloudProtectedPolices : sql_fulllog_backup_policy_daily

Example 9: Listing all Oracle Plug-in resources on a specified host

 Get-SmResources -PluginCode 'SCO' -HostName 'R8092776CF4V1.HNK2.com' -UseKnownResources

This example lists all the SnapCenter Plug-in for Oracle resources on a specified host.

DBName: DB11
			DBVersion : 19.0.0.0.0
			DBId  : R8092776CF4V1.HNK2.com\DB11
			DBType: Oracle Single Instance
			Protected : No
			OverallStatus : Not protected
			DBName: DB13
			DBVersion : 19.0.0.0.0
			DBId  : R8092776CF4V1.HNK2.com\DB13
			DBType: Oracle Single Instance
			Protected : No
			OverallStatus : Not protected
			Name  : appVolLun
			Uid   : appVolLun
			Id: R8092776CF4V1.HNK2.com\appVolLun
			Type  : Application Volume
			Protected : No
			OverallStatus : Not protected
			Name  : appVol
			Uid   : appVol
			Id: R8092776CF4V1.HNK2.com\appVol
			Type  : Application Volume
			Protected : No
			OverallStatus : Not protected

Example 10: Listing all Oracle application volume resources on a specified host

 Get-SmResources -PluginCode 'SCO' -HostName 'R8092776CF4V1.HNK2.com' -UseKnownResources -AppObjectType 'ApplicationVolume'

This example lists all the Oracle application volume resources on a specified host.

			Name  : appVolLun
			Uid   : appVolLun
			Id: R8092776CF4V1.HNK2.com\appVolLun
			Type  : Application Volume
			Protected : No
			OverallStatus : Not protected
			Name  : appVol
			Uid   : appVol
			Id: R8092776CF4V1.HNK2.com\appVol
			Type  : Application Volume
			Protected : No
			OverallStatus : Not protected

Example 11: Listing all Oracle database resources on a specified host

 Get-SmResources -PluginCode 'SCO' -HostName 'R8092776CF4V1.HNK2.com' -UseKnownResources -AppObjectType 'Database'

This example lists all the Oracle database resources on a specified host.

			DBName: DB11
			DBVersion : 19.0.0.0.0
			DBId  : R8092776CF4V1.HNK2.com\DB11
			DBType: Oracle Single Instance
			Protected : No
			OverallStatus : Not protected
			DBName: DB13
			DBVersion : 19.0.0.0.0
			DBId  : R8092776CF4V1.HNK2.com\DB13
			DBType: Oracle Single Instance
			Protected : No
			OverallStatus : Not protected

Example 12: Get Oracle Plug-in resources on a specified host and filter by resource name

 Get-SmResources -PluginCode 'SCO' -HostName 'R8092776CF4V1.HNK2.com' -UseKnownResources -AppObjectType 'ApplicationVolume' -ResourceName 'appVolLun'

This example gets the SnapCenter Plug-in for Oracle resources on a specified host and filters it by resource name

			Name  : appVolLun
			Uid   : appVolLun
			Id: R8092776CF4V1.HNK2.com\appVolLun
			Type  : Application Volume
			Protected : No
			OverallStatus : Not protected

Example 13: Trigger Discovery of Oracle Plug-in resources on a specified host and lists them

 Get-SmResources -PluginCode 'SCO' -HostName 'R8092776CF4V1.HNK2.com'

This example triggers discovery of SnapCenter Plug-in for Oracle resources on a specified host and lists them.

			Completed Discovering Resources: Job Id [3172]


DBName: DB11
			DBVersion : 19.0.0.0.0
			DBId  : R8092776CF4V1.HNK2.com\DB11
			DBType: Oracle Single Instance
			Protected : No
			OverallStatus : Not protected
			DBName: DB13
			DBVersion : 19.0.0.0.0
			DBId  : R8092776CF4V1.HNK2.com\DB13
			DBType: Oracle Single Instance
			Protected : No
			OverallStatus : Not protected
			Name  : appVolLun
			Uid   : appVolLun
			Id: R8092776CF4V1.HNK2.com\appVolLun
			Type  : Application Volume
			Protected : No
			OverallStatus : Not protected
			Name  : appVol
			Uid   : appVol
			Id: R8092776CF4V1.HNK2.com\appVol
			Type  : Application Volume
			Protected : No
			OverallStatus : Not protected