Get-AzSqlSyncAgent
Returns information about Azure SQL Sync Agents.
Syntax
Default (Default)
Get-AzSqlSyncAgent
[[-Name] <String>]
[-ServerName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzSqlSyncAgent cmdlet returns information about one or more Azure SQL Sync Agents. Specify the name of a sync agent to see information for only that sync agent.
Examples
Example 1: Get all instances of Azure SQL Sync Agent assigned to an Azure SQL Server
Get-AzSqlSyncAgent -ResourceGroupName "ResourceGroup01" -ServerName "Server01" | Format-List
ResourceId : subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/syncAgents/{SyncAgent01}
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
SyncAgentName : SyncAgent01
SyncDatabaseId : subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup01}/servers/{syncDatabaseServer01}/databases/{syncDatabaseName01}
LastAliveTime: : 6/1/2017 5:08:48 AM
Version : 4.3.6348.1
IsUpToDate : False
ExpiryTime :
State : Online
ResourceId : subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/syncAgents/{SyncAgent02}
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
SyncAgentName : SyncAgent02
SyncDatabaseId : subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup01}/servers/{syncDatabaseServer01}/databases/{syncDatabaseName01}
LastAliveTime: : 6/1/2017 5:08:48 AM
Version : 4.3.6348.1
IsUpToDate : False
ExpiryTime :
State : Online
This command gets information about all the Azure SQL Sync Agents assigned to an Azure SQL Server.
Example 2: Get information about an Azure SQL Sync Agent
Get-AzSqlSyncAgent -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -Name "SyncAgent01" | Format-List
ResourceId : subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/syncAgents/{SyncAgent01}
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
SyncAgentName : SyncAgent01
SyncDatabaseId : subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup01}/servers/{syncDatabaseServer01}/databases/{syncDatabaseName01}
LastAliveTime: : 6/1/2017 5:08:48 AM
Version : 4.3.6348.1
IsUpToDate : False
ExpiryTime :
State : Online
This command gets information about the Azure SQL Database Sync Agent with name "SyncAgent01"
Example 3: Get all instances of Azure SQL Sync Agent assigned to an Azure SQL Server using filtering
Get-AzSqlSyncAgent -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -Name SyncAgent* | Format-List
ResourceId : subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/syncAgents/{SyncAgent01}
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
SyncAgentName : SyncAgent01
SyncDatabaseId : subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup01}/servers/{syncDatabaseServer01}/databases/{syncDatabaseName01}
LastAliveTime: : 6/1/2017 5:08:48 AM
Version : 4.3.6348.1
IsUpToDate : False
ExpiryTime :
State : Online
ResourceId : subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/syncAgents/{SyncAgent02}
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
SyncAgentName : SyncAgent02
SyncDatabaseId : subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup01}/servers/{syncDatabaseServer01}/databases/{syncDatabaseName01}
LastAliveTime: : 6/1/2017 5:08:48 AM
Version : 4.3.6348.1
IsUpToDate : False
ExpiryTime :
State : Online
This command gets information about all the Azure SQL Sync Agents assigned to an Azure SQL Server that start with "SyncAgent".
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
The sync agent name.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | True |
DontShow: | False |
Aliases: | SyncAgentName |
Parameter sets
(All)
Position: | 2 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-ResourceGroupName
The name of the resource group.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-ServerName
The name of the Azure SQL Server the sync agent is in.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.