Get-MgmtSvcSqlResourcePoolByTemplate

Get-MgmtSvcSqlResourcePoolByTemplate

Gets resource pools created by using a template.

Syntax

Parameter Set: Default
Get-MgmtSvcSqlResourcePoolByTemplate [-AdminUri] <Uri> [-Token] <String> [-TemplateId] <String> [[-ServerName] <String[]> ] [-DisableCertificateValidation] [ <CommonParameters>]

Detailed Description

The Get-MgmtSvcSqlResourcePoolByTemplate cmdlet gets the resource pools that Windows Azure Pack for Windows Server created by using a specific template.

Parameters

-AdminUri<Uri>

Specifies the URI of the Windows Azure Pack administrator API. Use the following format: https://< computer>:<port>, where <computer> is the computer on which the administrator API is installed.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-DisableCertificateValidation

Disables certificate validation for the Windows Azure Pack installation. If you specify this parameter, you can use self-signed certificates.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServerName<String[]>

Specifies an array of names of SQL Server hosting servers for resource pools. This cmdlet gets the resource pools for the server that this parameter specifies.

Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-TemplateId<String>

Specifies the ID of a resource pool template for which this cmdlet gets resource pools.

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Token<String>

Specifies an identity token. To create a token, use the Get-MgmtSvcToken cmdlet.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

  • SqlResourcePoolList

    This cmdlet emits a SqlResourcePoolList object.

Examples

Example 1: Get resource pools by template

The first command creates a PSCredential object by using the Get-Credential cmdlet, and then stores it in the $Credential variable. The cmdlet prompts you for user name and password.

The second command creates a Windows token for the user in $Credential by using the Get-MgmtSvcToken cmdlet. The command stores the token in the $Token variable.

The final command gets resource pools for the specified administrator group for the Template18 template.

PS C:\> $Credential = Get-Credential
PS C:\> $Token = Get-MgmtSvcToken -Type Windows –AuthenticationSite "https://Computer01:30072" -ClientRealm "http://azureservices/AdminSite" -User $Credential -DisableCertificateValidation 
PS C:\> Get-MgmtSvcSqlResourcePoolByTemplate -AdminUri "https://Computer01:30004" -Token $Token -TemplateId "Template18"

Get-MgmtSvcSqlResourcePoolByGroup

Get-MgmtSvcSqlResourcePoolByServer