はじめに
後からリソースグループを変更したい時ってありますよね。今回はAzure PowerShell ModuleでAzure-Arc Enabled Serverのリソースプールを移行する方法を紹介します。
私の記事ではお馴染みThomas Maurer氏の記事を参考にさせていただいています。
手順
使うコマンドは以下です。
# Get Azure Arc-enabled Server you want to move
$Resource = Get-AzResource -ResourceType "microsoft.hybridcompute/machines" -ResourceName <ResourceName>
# Move Azure Arc-enabled server to new resource group and subscription
Move-AzResource -ResourceId $Resource.ResourceId -DestinationResourceGroupName <DestinationResouceGroupName>
できました。やったね。処理完了まで5分程度かかったのですがプログレスバーが0%から動かなくて怖いですが完了すると一気に動きます。