Open fjwolz19 opened 3 years ago
There is a way, and I've done it.
Find:
[ValidateSet("HP", "Hewlett-Packard", "Dell", "Lenovo", "Microsoft", "Fujitsu", "Panasonic", "Viglen", "AZW", "Getac")]
Replace:
[ValidateSet("HP", "Hewlett-Packard", "Dell", "Lenovo", "Microsoft", "Fujitsu", "Panasonic", "Viglen", "AZW", "Getac", "VMWare")] #MODIFIED FOR VMWARE
Then
Find:
"*Getac*" { $ComputerDetails.Manufacturer = "Getac" $ComputerDetails.Model = (Get-WmiObject -Class "Win32_ComputerSystem" | Select-Object -ExpandProperty Model).Trim() $ComputerDetails.SystemSKU = (Get-CIMInstance -ClassName "MS_SystemInformation" -NameSpace root\WMI).BaseBoardProduct.Trim() }
Add:
"*VMWare*" { #MODIFIED FOR VMWARE $ComputerDetails.Manufacturer = "VMWare" $ComputerDetails.Model = (Get-WmiObject -Class "Win32_ComputerSystem" | Select-Object -ExpandProperty Model).Trim() $ComputerDetails.SystemSKU = (Get-CIMInstance -ClassName "MS_SystemInformation" -NameSpace root\WMI).BaseBoardProduct.Trim() }
Lastly,
Find:
Write-CMLogEntry -Value " - Unsupported computer platform detected, virtual machines are not supported" -Severity 3 # Throw terminating error $PSCmdlet.ThrowTerminatingError((New-TerminatingErrorRecord))
Replace:
Write-CMLogEntry -Value " - Unsupported computer platform detected, virtual machines are not supported, continuing anyway." -Severity 3 #MODIFIED FOR VMWARE # Throw terminating error # $PSCmdlet.ThrowTerminatingError((New-TerminatingErrorRecord)) #MODIFIED FOR VMWARE
This will need to be done if you ever update the script again.
Proof:
Package setup:
Name it:
Drivers - VMWare - Windows 10 x64
Manufacturer:
VMware
Comment:
(Models included:440BX Desktop Reference Platform)
Good luck!
So, I realize that Virtual Machines are not supported and it's explictly coded in so there must be a reason. I was hoping I could create a custom package for VMWare and be able to use the same Task Sequence and driver method for everything. In fact I did do that, but the check at the beginning wouldn't let it try and use it.
Is that something that could ever be added? Any reason I shouldn't edit the ps to skip that check (at my own risk of course)?