Does anyone know the correct syntax for having multiple DNS servers and search suffixes in the New-OSCustomizationSpec command? Here is what I'm trying:
$VMspec = New-OSCustomizationSpec -FullName "$VMFullName" -OrgName "$VMOrgName" -OSType "Windows" -ChangeSid -Type Persistent -Name "$VMName-spec" -DnsServer "$VMDNS" -DnsSuffix "$VMSuffix" -NamingScheme "Fixed" -NamingPrefix "$VMName" -Workgroup "$Workgroup" -TimeZone "$TimeZone" -ProductKey "$WinLicense" -LicenseMode "$LicenseMode" -LicenseMaxConnections "$LicenseConns" -AdminPassword "$AdminPW"
Where "VMDNS = "10.1.1.1 10.2.2.2" and $VMSuffix = "suffix.org suffix.net" (both space separated). When I use this, the VM gets set to use DHCP rather than my configured static address (shows this in guestcust.log). However, if I change this to be "VMDNS = "10.1.1.1" and $VMSuffix = "suffix.org", then the whole network configuration gets set correctly. I suspect the problem gets causd by the invalid DNS server entry, since the customization wizard (if I edit the customization) actually shows the suffixes. Both on one line, so they don't work, but it does get set at least.
I can't find any documentation about the format these should have. Interestingly, these space-separated entries work just fine on my linux VMs.