会社には、オンプレミスの Active Directory ドメインとのハイブリッド共存用に構成された Azure Active Directory (Azure AD) テナントがあります。 オンプレミスの仮想環境は、Windows Server 2012 R2 Hyper-V ホスト サーバー上で実行される仮想マシン (VM) で構成されます。 新しく作成された VM の構成を自動化するための PowerShell スクリプトをいくつか作成しました。 いくつかの新しい VM を作成する予定です。 スクリプトが新しい VM 上で実行されることを保証するソリューションが必要です。 次のどれが最善の解決策でしょうか?
正解:A
After you deploy a Virtual Machine you typically need to make some changes before it's ready to use. This is something you can do manually or you could use Remote PowerShell to automate the configuration of your VM after deployment for example. But now there's a third alternative available allowing you customize your VM: the CustomScriptextension. This CustomScript extension is executed by the VM Agent and it's very straightforward: you specify which files it needs to download from your storage account and which file it needs to execute. You can even specify arguments that need to be passed to the script. The only requirement is that you execute a .ps1 file. Reference: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/add-a-custom-script- to-windows-setup https://azure.microsoft.com/en-us/blog/automating-vm-customization-tasks-using-custom-script- extension/