Get-AzSqlInstanceLink
Returns information about link feature for Azure SQL Managed Instance.
Syntax
Get-AzSqlInstanceLink
[-ResourceGroupName] <String>
[-InstanceName] <String>
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceLink
[[-Name] <String>]
[-InstanceObject] <AzureSqlManagedInstanceModel>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceLink
[[-Name] <String>]
[-InstanceResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceLink
[-ResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzSqlInstanceLink cmdlet returns information about one or more instance of Azure SQL Managed Instance links. Specify the name of a link to see information for that link only.
Examples
Example 1: Get information about an active link on Azure SQL Managed Instance
Get-AzSqlInstanceLink -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "Link01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
This command gets information about the instance link named "Link01" on instance "Instance01" and resource group "ResourceGroup01".
Example 2: Get information about all active links on Azure SQL Managed Instance
Get-AzSqlInstanceLink -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
TargetDatabase : Database02
SourceEndpoint : TCP://SERVER02:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
This command gets information about all active instance links on instance "ManagedInstance01" and resource group "ResourceGroup01".
Example 3: Get all instance links on Azure SQL Managed Instance using Instance object
$instance = Get-AzSqlInstance -Name "ManagedInstance01" -ResourceGroupName "ResourceGroup01"
Get-AzSqlInstanceLink -InstanceObject $instance
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
TargetDatabase : Database02
SourceEndpoint : TCP://SERVER02:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
This command gets information on all active instance links on the instance "ManagedInstance01".
Example 4: Get all instance links on Azure SQL Managed Instance using resource identifier
Get-AzSqlInstanceLink -InstanceResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
TargetDatabase : Database02
SourceEndpoint : TCP://SERVER02:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
This command gets information about all instance links for the instance "ManagedInstance01".
Example 5: Get an instance link using its resource identifier
Get-AzSqlInstanceLink -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
This command gets information about the instance link named "Link01".
Example 6: Get all instance links for a Managed Instance by piping an instance object
Get-AzSqlInstance -Name "ManagedInstance01" -ResourceGroupName "ResourceGroup01" | Get-AzSqlInstanceLink
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
TargetDatabase : Database02
SourceEndpoint : TCP://SERVER02:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
This command gets information about all instance links within the instance "ManagedInstance01".
Example 7: Get a specific instance link for an instance by piping an instance object and specifying the link name
Get-AzSqlInstance -Name "ManagedInstance01" -ResourceGroupName "ResourceGroup01" | Get-AzSqlInstanceLink -Name "Link01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
This command gets information about the instance link named "Link01: within the instance "Instance01".
Example 8: Get information about instance link using positional parameters
Get-AzSqlInstanceLink "ResourceGroup01" "ManagedInstance01" "Link01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
This command gets information about the instance link named "Link01" on instance "Instance01" and resource group "ResourceGroup01".
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InstanceName
Name of Azure SQL Managed Instance.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InstanceObject
Instance input object.
Type: | AzureSqlManagedInstanceModel |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InstanceResourceId
Managed instance resource ID.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Name of the instance link.
Type: | String |
Aliases: | LinkName |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Name of the resource group.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
The instance link resource ID.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Outputs
AzureSqlManagedInstanceLinkModel
Related Links
Azure PowerShell