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
<# | |
.SYNOPSIS | |
Converts an Azure Gen1 (V1) Windows VM to a Gen2 (V2) VM by imaging the OS to a new V2 disk, | |
swapping the OS disk, and verifying the new VM boots fully into Windows before cleanup. | |
Provided by John Marcum - https://x.com/PJ_Marcum | |
.DESCRIPTION | |
High-level flow (orchestrated from the host): | |
1) Build a temporary helper VM (Gen2) in the same RG/subnet as the source. | |
2) Create two migration artifacts from the source OS disk: |
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
param( | |
[string] $Mode | |
) | |
Add-Type -Language CSharp -TypeDefinition @' | |
using System; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Collections.Generic; | |
namespace Rds { |
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
param( | |
[ValidateNotNullOrEmpty()] | |
[ValidateSet('Default', 'StartInternalTask-1', 'StartInternalTask-2', 'StartInternalTask-3', 'CheckInternalTask')] | |
[string] $mode = "Default" | |
) | |
$ErrorActionPreference = "Stop" | |
#region Configuration |
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
# Script framework to install applications from a folder. | |
# Name of your installation | |
$name="Remote Desktop Client" | |
# Path of the application installation folder, including the executable of the installer (or ps1. or MSI) | |
$installer="\\wvduserdata.file.core.windows.net\apps-2-install\MSRDC-AVD-Client\Deploy-Application.exe" | |
# Parameter needed for an application (only for exe or ps1 files) | |
$parameters="Install" |