Last active
September 4, 2022 13:50
-
-
Save likamrat/8ae676306997eea4bed2b213cfa1861a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$SourceResourceGroupName = "Heaven" | |
$DestinationResourceGroupName = "Hell" | |
$NumMachines = 1 | |
$AzureArcMachine = Get-AzResource -ResourceGroupName $SourceResourceGroupName -ResourceType Microsoft.HybridCompute/machines | Select-Object -First $NumMachines | |
ForEach-Object { | |
$AzureArcMachine | ForEach-Object { | |
Move-AzResource -DestinationResourceGroupName $DestinationResourceGroupName -ResourceId $AzureArcMachine.ResourceId -Confirm:$false -Force | |
} | |
Start-Sleep -Seconds 300 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment