Get-AzSqlInstance
Restituisce informazioni sul database dell'istanza gestita del database SQL di Azure.
Sintassi
Get-AzSqlInstance
[-Name <String>]
[-ResourceGroupName <String>]
[-ExpandActiveDirectoryAdministrator]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstance
[-InstancePool] <AzureSqlInstancePoolModel>
[-ExpandActiveDirectoryAdministrator]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstance
[-InstancePoolResourceId] <String>
[-ExpandActiveDirectoryAdministrator]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstance
[-ResourceId] <String>
[-ExpandActiveDirectoryAdministrator]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstance
[-InstancePoolName] <String>
-ResourceGroupName <String>
[-ExpandActiveDirectoryAdministrator]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Descrizione
Il cmdlet Get-AzSqlInstance restituisce informazioni su uno o più Istanza gestita di SQL di Azure. Specificare il nome di un'istanza per visualizzare le informazioni solo per tale istanza.
Esempio
Esempio 1: Ottenere tutte le istanze assegnate a un gruppo di risorse
Get-AzSqlInstance -ResourceGroupName "ResourceGroup01"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
ZoneRedundant : false
Questo comando ottiene informazioni su tutte le istanze assegnate al gruppo di risorse ResourceGroup01.
Esempio 2: Ottenere informazioni su un'istanza
Get-AzSqlInstance -Name "managedInstance1" -ResourceGroupName "ResourceGroup01"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
ZoneRedundant : false
Questo comando ottiene informazioni sull'istanza denominata managedInstance1.
Esempio 3: Ottenere tutte le istanze assegnate a un gruppo di risorse usando il filtro
Get-AzSqlInstance -ResourceGroupName "ResourceGroup01" -Name "managedInstance*"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
ZoneRedundant : false
Questo comando ottiene informazioni su tutte le istanze assegnate al gruppo di risorse ResourceGroup01 che iniziano con "managedInstance".
Esempio 4: Ottenere tutte le istanze all'interno di un pool di istanze
Get-AzSqlInstance -ResourceGroupName "ResourceGroup01" -InstancePoolName "instancePool0"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Questo comando ottiene informazioni su tutte le istanze all'interno del pool di istanze "instancePool0".
Esempio 5: Ottenere tutte le istanze all'interno di un pool di istanze usando l'oggetto pool di istanze
$instancePool = Get-AzSqlInstancePool -ResourceGroupName "ResourceGroup01" -Name "instancePool0"
Get-AzSqlInstance -InstancePool $instancePool
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Questo comando ottiene informazioni su tutte le istanze all'interno del pool di istanze "instancePool0".
Esempio 6: Ottenere tutte le istanze all'interno di un pool di istanze usando l'identificatore di risorsa del pool di istanze
Get-AzSqlInstance -InstancePoolResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Questo comando ottiene informazioni su tutte le istanze all'interno del pool di istanze "instancePool0".
Esempio 7: Ottenere un'istanza gestita usando il relativo identificatore di risorsa
Get-AzSqlInstance -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName :
ZoneRedundant : false
Questo comando ottiene informazioni sull'istanza denominata managedInstance1.
Esempio 8: Ottenere tutte le istanze assegnate a un gruppo di risorse con informazioni di amministratore esterno
$val = Get-AzSqlInstance -ResourceGroupName "ResourceGroup01" -ExpandActiveDirectoryAdministrator
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
Administrators : Microsoft.Azure.Management.Sql.Models.ManagedInstanceExternalAdministrator
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
Administrators : Microsoft.Azure.Management.Sql.Models.ManagedInstanceExternalAdministrator
ZoneRedundant : false
$val.Administrators
AdministratorType : ActiveDirectory
PrincipalType : Group
Login : Dummy
Sid : df7667b8-f9fd-4029-a0e3-b43c75ce9538
TenantId : 00001111-aaaa-2222-bbbb-3333cccc4444
AzureADOnlyAuthentication : True
AdministratorType : ActiveDirectory
PrincipalType : Group
Login : Dummy2
Sid : df7667b8-f9fd-4029-a0e3-b43c75ce9538
TenantId : 00001111-aaaa-2222-bbbb-3333cccc4444
AzureADOnlyAuthentication : True
Questo comando ottiene informazioni su tutte le istanze assegnate al gruppo di risorse ResourceGroup01. .
Esempio 9: Ottenere informazioni su un'istanza con informazioni di amministratore esterno
$val = Get-AzSqlInstance -Name "managedInstance1" -ResourceGroupName "ResourceGroup01" -ExpandActiveDirectoryAdministrator
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
Administrators : Microsoft.Azure.Management.Sql.Models.ManagedInstanceExternalAdministrator
ZoneRedundant : false
$val.Administrators
AdministratorType : ActiveDirectory
PrincipalType : Group
Login : Dummy
Sid : df7667b8-f9fd-4029-a0e3-b43c75ce9538
TenantId : 00001111-aaaa-2222-bbbb-3333cccc4444
AzureADOnlyAuthentication : True
Questo comando ottiene informazioni sull'istanza denominata managedInstance1.
Parametri
-DefaultProfile
Le credenziali, l’account, il tenant e la sottoscrizione usati per comunicare con Azure.
Tipo: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Posizione: | Named |
Valore predefinito: | None |
Necessario: | False |
Accettare l'input della pipeline: | False |
Accettare caratteri jolly: | False |
-ExpandActiveDirectoryAdministrator
Espandere Informazioni sull'amministratore di Active Directory nel server.
Tipo: | SwitchParameter |
Posizione: | Named |
Valore predefinito: | None |
Necessario: | False |
Accettare l'input della pipeline: | False |
Accettare caratteri jolly: | False |
-InstancePool
Oggetto padre del pool di istanze.
Tipo: | AzureSqlInstancePoolModel |
Alias: | ParentObject |
Posizione: | 0 |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | True |
Accettare caratteri jolly: | False |
-InstancePoolName
Nome del pool di istanze.
Tipo: | String |
Posizione: | 1 |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | False |
Accettare caratteri jolly: | True |
-InstancePoolResourceId
Identificatore della risorsa del pool di istanze.
Tipo: | String |
Posizione: | 0 |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | True |
Accettare caratteri jolly: | False |
-Name
Nome istanza SQL.
Tipo: | String |
Alias: | InstanceName |
Posizione: | Named |
Valore predefinito: | None |
Necessario: | False |
Accettare l'input della pipeline: | False |
Accettare caratteri jolly: | True |
-ResourceGroupName
Nome del gruppo di risorse.
Tipo: | String |
Posizione: | Named |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | False |
Accettare caratteri jolly: | False |
-ResourceId
Identificatore di risorsa dell'istanza gestita.
Tipo: | String |
Posizione: | 0 |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | True |
Accettare caratteri jolly: | False |
Input
None