Image a Windows Virtual Machine In Azure, then Deploy And Join It To A Domain
The following Azure Resource Manager mode PowerShell will allow you to create an image of an existing Windows virtual machine in Azure, deploy it at will and join it to a domain if necessary.
Login to PowerShell
[code language=”powershell”]
Get-AzureSubscription
$SubID = "your-subscription-ID"
Login-AzureRMAccount
Select-AzureRmSubscription -SubscriptionId $SubID
[/code]
Create the virtual machine image
Run sysprep on the desired virtual machine in Azure.
[code language=”dos”]%windir%\system32\sysprep[/code]
When prompted for System Cleanup Action choose ‘Enter System Out of The Box Experience (OOBE)‘, Generalize and Shutdown from Shutdown Options.… [Keep reading] “Image a Windows Virtual Machine In Azure, then Deploy And Join It To A Domain”