Remove-AzSqlInstanceLink cmdlet drops an instance link. This command may cause data loss if the link is dropped and replica's LSNs are not synchronized with the primary, thus user must explicitly confirm the command when prompted, or use -Force parameter.
This operation may cause data loss if replica's last hardened LSN is not in sync with the primary. Are you sure you want to proceed?
[Y] Yes [N] No [?] Help (default is "Y"): Y
This command removes the instance link "Link01" from the managed instance "ManagedInstance01".
Example 2: Remove instance link with an explicit -Force flag
This operation may cause data loss if replica's last hardened LSN is not in sync with the primary. Are you sure you want to proceed?
[Y] Yes [N] No [?] Help (default is "Y"): Y
This command removes the instance link with specified resource ID.
Example 4: Remove instance link by its PowerShell object
This operation may cause data loss if replica's last hardened LSN is not in sync with the primary. Are you sure you want to proceed?
[Y] Yes [N] No [?] Help (default is "Y"): Y
This command removes the instance link specified by instance link object.
Example 5: Remove instance link by its parent instance object
This operation may cause data loss if replica's last hardened LSN is not in sync with the primary. Are you sure you want to proceed?
[Y] Yes [N] No [?] Help (default is "Y"): Y
This command removes the instance link "Link01" from the managed instance specified by the instance object.
Example 6: Remove instance link using positional parameters
This operation may cause data loss if replica's last hardened LSN is not in sync with the primary. Are you sure you want to proceed?
[Y] Yes [N] No [?] Help (default is "Y"): Y
This command removes the instance link "Link01" from the managed instance "ManagedInstance01" using positional parameters.
Example 7: Remove all instance links from its parent instance by piping link objects
This operation may cause data loss if replica's last hardened LSN is not in sync with the primary. Are you sure you want to proceed?
[Y] Yes [N] No [?] Help (default is "Y"): Y
This command removes an instance link from the managed instance "ManagedInstance01" and outputs the deleted instance link object.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
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.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.