@@ -66,10 +66,7 @@ If (-not $isAdmin) {
6666 </settings>
6767 <settings pass="specialize">
6868 <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
69- <OEMInformation>
70- <SupportProvider>WSLab</SupportProvider>
71- <SupportURL>https://aka.ms/wslab</SupportURL>
72- </OEMInformation>
69+ $oeminformation
7370 <RegisteredOwner>PFE</RegisteredOwner>
7471 <RegisteredOrganization>PFE Inc.</RegisteredOrganization>
7572 </component>
@@ -118,10 +115,7 @@ If (-not $isAdmin) {
118115 <settings pass="specialize">
119116 <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
120117 <ComputerName>$Computername </ComputerName>
121- <OEMInformation>
122- <SupportProvider>WSLab</SupportProvider>
123- <SupportURL>https://aka.ms/wslab</SupportURL>
124- </OEMInformation>
118+ $oeminformation
125119 <RegisteredOwner>PFE</RegisteredOwner>
126120 <RegisteredOrganization>PFE Inc.</RegisteredOrganization>
127121 </component>
@@ -186,10 +180,7 @@ If (-not $isAdmin) {
186180 <settings pass="specialize">
187181 <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
188182 <ComputerName>$Computername </ComputerName>
189- <OEMInformation>
190- <SupportProvider>WSLab</SupportProvider>
191- <SupportURL>https://aka.ms/wslab</SupportURL>
192- </OEMInformation>
183+ $oeminformation
193184 <RegisteredOwner>PFE</RegisteredOwner>
194185 <RegisteredOrganization>PFE Inc.</RegisteredOrganization>
195186 </component>
@@ -432,6 +423,11 @@ If (-not $isAdmin) {
432423 }
433424 WriteInfoHighlighted " `t Creating OS VHD"
434425 New-VHD - ParentPath $serverparent.fullname - Path $vhdpath
426+
427+ # Get VM Version
428+ [System.Version ]$VMVersion = (Get-WindowsImage - ImagePath $VHDPath - Index 1 ).Version
429+ WriteInfo " `t VM Version is $ ( $VMVersion.Build ) .$ ( $VMVersion.Revision ) "
430+
435431 WriteInfo " `t Creating VM"
436432 if ($VMConfig.Generation -eq 1 ){
437433 $VMTemp = New-VM - Name $VMname - VHDPath $vhdpath - MemoryStartupBytes $VMConfig.MemoryStartupBytes - path " $LabFolder \VMs" - SwitchName $SwitchName - Generation 1
@@ -582,6 +578,16 @@ If (-not $isAdmin) {
582578 WriteInfo " `t`t No sync commands requested"
583579 }
584580
581+ if ($VMVersion.Build -ge 17763 ){
582+ $oeminformation = @"
583+ <OEMInformation>
584+ <SupportProvider>WSLab</SupportProvider>
585+ <SupportURL>https://aka.ms/wslab</SupportURL>
586+ </OEMInformation>
587+ "@
588+ }else {
589+ $oeminformation = $null
590+ }
585591 # configure native VLAN and AllowedVLANs
586592 WriteInfo " `t Configuring NativeVLAN and AllowedVLANs"
587593 if ($VMConfig.ManagementSubnetID -gt 0 ){
0 commit comments