Get-AzureRmSqlSyncAgent
Returns information about Azure SQL Sync Agents.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Get-AzureRmSqlSyncAgent
[[-Name] <String>]
[-ServerName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzureRmSqlSyncAgent 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
PS C:\>Get-AzureRmSqlSyncAgent -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
PS C:\>Get-AzureRmSqlSyncAgent -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"
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
The sync agent name.
Type: | String |
Aliases: | SyncAgentName |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServerName
The name of the Azure SQL Server the sync agent is in.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |