Remove-AzMigrateHCIServerReplication
Stops replication for the migrated server.
Syntax
Remove-AzMigrateHCIServerReplication
-TargetObjectID <String>
[-SubscriptionId <String>]
[-ForceRemove <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzMigrateHCIServerReplication
[-SubscriptionId <String>]
-InputObject <IMigrateIdentity>
[-ForceRemove <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-AzMigrateHCIServerReplication cmdlet stops the replication for a migrated server.
Examples
Example 1: Remove replication by Id
Remove-AzMigrateHCIServerReplication -TargetObjectID "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication/replicationVaults/testproj1234replicationvault/protectedItems/00001111-aaaa-2222-bbbb-3333cccc4444"
ActivityId : ActivityId: 00000000-0000-0000-0000-000000000000
AllowedAction : {Cancel}
CustomPropertyAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelCustomPropertiesAffectedObjectDetails
CustomPropertyInstanceType : WorkflowDetails
DisplayName : Delete protected item
EndTime :
Error : {}
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication/replicationVaults/testproj1234replicationvault/jobs/2b0b356e-d106-43af-ad26-02631fcaebba
Name : 2b0b356e-d106-43af-ad26-02631fcaebba
ObjectId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication/replicationVaults/testproj1234replicationvault/protectedItems/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb
ObjectInternalId : a40ecd8e-6413-574d-b1f8-2ef925e087fc
ObjectInternalName : testmachine
ObjectName : aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb
ObjectType : ProtectedItem
ReplicationProviderId : 4de0fddc-bdfe-40d9-b60e-678bdce89630
SourceFabricProviderId : b35da11c-d69e-4220-9a90-d81ed93ad2fc
StartTime : 7/25/2023 10:14:42 PM
State : Started
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Tag : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelTags
TargetFabricProviderId : 22f00372-a1b7-467f-87ce-d95e17a6e7c7
Task : {Prerequisite check, Deleting protected item}
Type : Microsoft.DataReplication/replicationVaults/jobs
Remove AzStackHCI replication by Id.
Example 2: Remove replication by input object
$InputObject = Get-AzMigrateHCIServerReplication -TargetObjectID "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication/replicationVaults/testproj1234replicationvault/protectedItems/00001111-aaaa-2222-bbbb-3333cccc4444"
Remove-AzMigrateHCIServerReplication -InputObject $InputObject
$InputObject | Remove-AzMigrateHCIServerReplication
ActivityId : ActivityId: 00000000-0000-0000-0000-000000000000
AllowedAction : {Cancel}
CustomPropertyAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelCustomPropertiesAffectedObjectDetails
CustomPropertyInstanceType : WorkflowDetails
DisplayName : Delete protected item
EndTime :
Error : {}
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication/replicationVaults/testproj1234replicationvault/jobs/2b0b356e-d106-43af-ad26-02631fcaebba
Name : 2b0b356e-d106-43af-ad26-02631fcaebba
ObjectId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication/replicationVaults/testproj1234replicationvault/protectedItems/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb
ObjectInternalId : a40ecd8e-6413-574d-b1f8-2ef925e087fc
ObjectInternalName : testmachine
ObjectName : aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb
ObjectType : ProtectedItem
ReplicationProviderId : 4de0fddc-bdfe-40d9-b60e-678bdce89630
SourceFabricProviderId : b35da11c-d69e-4220-9a90-d81ed93ad2fc
StartTime : 7/25/2023 10:14:42 PM
State : Started
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Tag : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelTags
TargetFabricProviderId : 22f00372-a1b7-467f-87ce-d95e17a6e7c7
Task : {Prerequisite check, Deleting protected item}
Type : Microsoft.DataReplication/replicationVaults/jobs
Remove AzStackHCI replication by replication input object.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ForceRemove
Specifies whether the replication needs to be force removed. Default to "false".
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Specifies the replcating server for which the replication needs to be disabled. The server object can be retrieved using the Get-AzMigrateHCIServerReplication cmdlet. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IMigrateIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SubscriptionId
Azure Subscription ID.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TargetObjectID
Specifies the replcating server for which the replication needs to be disabled. The ID should be retrieved using the Get-AzMigrateHCIServerReplication cmdlet.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |