DeploymentResearch / DRFiles

Sample files for the Deployment Research Blog
MIT License
358 stars 322 forks source link

Get-DriverPackages.ps1 - Handle WMI Query for Lenovo Machines #5

Open crew05king opened 7 years ago

crew05king commented 7 years ago

Does it make sense to add something like this to the Get-DriverPackages.ps1 script to handle Lenovo machines since they use a different naming convention for wmic csproduct get name?

If (((Get-CimInstance -ClassName win32_computersystemproduct -Namespace root\cimv2).Vendor) -eq "LENOVO")
        {

           $script:Model = (Get-CimInstance -ClassName win32_computersystemproduct -Namespace root\cimv2).Version
        }
        Else
        {

           $script:Model = (Get-CimInstance -ClassName win32_computersystemproduct -Namespace root\cimv2).Name 

        }
arwidmark commented 6 years ago

Yes, it does. I'll check in with Matthew.