{ "name": "Gen-20h2-0712-NetTest", "type": "Microsoft.VirtualMachineImages/imageTemplates", "apiVersion": "2022-02-14", "location": "northcentralus", "dependsOn": [], "tags": { "userIdentity": "enabled", "CostCenter": "*" }, "identity": { "type": "UserAssigned", "userAssignedIdentities": { "/subscriptions/*/resourcegroups/*/providers/Microsoft.ManagedIdentity/userAssignedIdentities/*": {} } }, "properties": { "buildTimeoutInMinutes" : 120, "vmProfile": { "vmSize": "Standard_D8as_v4", "osDiskSizeGB": 127, "vnetConfig": { "subnetId": "/subscriptions/*/resourceGroups/*/providers/Microsoft.Network/virtualNetworks/*/subnets/*" } }, "source": { "type": "PlatformImage", "publisher": "MicrosoftWindowsDesktop", "offer": "windows-10", "sku": "20h2-ent", "version": "latest" }, "customize": [ { "type": "PowerShell", "name": "GetAzCopy", "runElevated": true, "runAsSystem": true, "inline": [ "Write-Host \"Copying AzCopy\"", "New-Item -ItemType Directory -Path \"C:\\\" -Name TEMP", "New-Item -ItemType Directory -Path \"C:\\TEMP\" -Name Apps", "Invoke-WebRequest -URI \"https://aka.ms/downloadazcopy-v10-windows\" -OutFile \"C:\\TEMP\\azcopy.zip\"", "Expand-Archive \"C:\\TEMP\\azcopy.zip\" \"C:\\TEMP\"", "Copy-Item \"C:\\TEMP\\azcopy_windows_amd64_*\\azcopy.exe\\\" -Destination \"C:\\TEMP\"" ] }, { "type": "PowerShell", "name": "Disable Firewall", "inline": [ "netsh advfirewall set domainprofile state off" ] }, { "type": "PowerShell", "name": "Enable Remote Connections", "runElevated": true, "runAsSystem": true, "inline": [ "Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\" -Name fDenyTSConnections -Type DWORD -Value 0 -Force" ] }, { "type": "PowerShell", "name": "Copy Test Script", "runElevated": true, "runAsSystem": true, "inline": [ "New-Item -ItemType Directry -Path C:\\PerrigoAppInstalls", "AzCopy .\\Copyfiles.vbs C:\\PerrigoAppInstalls" ] }, { "type": "PowerShell", "name": "Timezone Redirect", "runElevated": true, "runAsSystem": true, "scriptUri": "https://raw.githubusercontent.com/bferg317/ImageBuilder/master/timezoneredirect.ps1" }, { "type": "WindowsUpdate", "searchCriteria": "IsInstalled=0", "filters": [ "exclude:$_.Title -like \"*Preview*\"", "include:$true" ], "updateLimit": 40 }, { "type": "PowerShell", "name": "Debug Placeholder", "runElevated": true, "runAsSystem": true, "inline": [ "Write-Host \"C30\"" ] }, { "type": "PowerShell", "name": "SysprepFix", "runElevated": true, "runAsSystem": true, "scriptUri": "https://raw.githubusercontent.com/bferg317/ImageBuilder/master/sysprepfix.ps1" }, { "type": "WindowsRestart", "restartCheckCommand": "Write-Host 'Final reboot before capture.'", "restartTimeout": "5m" } ], "distribute": [ { "type": "SharedImage", "galleryImageId": "/subscriptions/*/resourceGroups/*/providers/Microsoft.Compute/galleries/ImageBuilderGallery/images/AIB-NetTest", "runOutputName": "AIB-NetTest", "artifactTags": { "source": "wvd10", "baseosimg": "windows10", "workflow": "aib-general", "CostCenter": "0010137100" }, "replicationRegions": [ "northcentralus" ] } ] } }