Jump to content
Drew

Manufacturer variable

Recommended Posts

Hi everyone, I may need a lesson on how to search- but honestly, couldn't find anything on this. How do I pull in the manufacturer of the computer from a script? i.e. I need to know if it's a Dell box. I'm assuming I have to run a SQL Query or something, but maybe it's simpler than that?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

You can use powershell. This is how I automatically install DellCommandUpdate on Dell workstations (enterprise class) but you can adjust.

powershell.exe -executionpolicy bypass -command "$manufacturer = (Get-WmiObject -Class:win32_Computersystem).manufacturer;$PCModel = (Get-WmiObject -Class:win32_Computersystem).model;if ($manufacturer -like 'dell*'){if ($PCModel -like 'latitude*' -or $PCModel -like 'optiplex*' -or $PCModel -like 'precision*'){Write-Output $manufacturer}}else{}"

  • Like 1

Share this post


Link to post
Share on other sites

Better still, do it the Automate way. Rather than detecting the manufacturer in the script, only run the script on Dell machines.

As an example, to push Dell support assist:

  • Create a search called something like Just-Dell-Workstations.
  • Create a group called something like Just-Dell-Workstations.
  • Populated the group with Just-Dell-Workstations search and limit it to that search
  • Create another search which is Machines-Missing-SupportAssist which selects only machines which do *not* have Support Assist installed
  • Create a script called Install-Dell-Support-assist
  • In the Just-Dell-Workstations group configuration > computers > scheduled scripts add a line to execute the Install-Dell-Support-Assist, but limit it to Machines-Missing-SupportAssist

The above will run the Install-Dell-Support-Assist script on only Dell workstations which do not have Support Assist already installed

No need to add checks in your script.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...