Managing client machines in SCCM (System Center Configuration Manager) can sometimes feel like you’re playing hide and seek. You want to quickly find multiple computers, but there’s no obvious “search multiple hostnames” button. Sound familiar?

TLDR: The SCCM console doesn’t natively support searching multiple hostnames at once via the search bar. But don’t worry! There are workarounds like using custom queries, scripts, or exporting/importing collections. If you consistently need to check the same groups of devices, collections are your best friend.

Why Would You Want to Search Multiple Hostnames?

Maybe your IT manager just handed you a list of 20 computers. Maybe you’re troubleshooting an update issue. Or maybe you like feeling like a tech wizard. Either way, finding many computers quickly makes your life easier.

Unfortunately, the search bar in SCCM isn’t built for multiple entries like “PC001, PC002, PC003”. It just doesn’t work that way—at least, not directly.

The Problem with the Search Box

Let’s get this out of the way: You can’t paste a list of hostnames into the search bar and expect results. It only looks for one search term at a time. Bummer, right?

So, what’s the trick?

Option 1: Use a Custom Query

This is where WQL (WMI Query Language) comes in. It may sound scary, but it’s basically like using SQL for SCCM. You create a query to pull up computers that match specific names.

Let’s say you have a list like:

  • PC001
  • PC002
  • PC003

You can build a custom query like this:

SELECT * FROM SMS_R_System 
WHERE SMS_R_System.Name IN ("PC001", "PC002", "PC003")

To do this:

  1. Open the SCCM Console.
  2. Navigate to Monitoring > Queries.
  3. Right-click and choose New Query.
  4. Give it a name you’ll remember.
  5. In the Query Statement, click Edit Query Statement.
  6. Click Show Query Language.
  7. Paste your WQL code and hit OK.

And boom — there’s your list of machines!

Option 2: Use PowerShell

If you’re thinking, “But I’m not a coder!”, no worries. This is beginner-friendly scripting. You can use PowerShell to search for computer names in SCCM.

Here’s a very basic script:

$Computers = @("PC001", "PC002", "PC003")
foreach ($computer in $Computers) {
    Get-CMDevice -Name $computer
}

This script does a loop through each hostname and pulls it up from SCCM. You’ll need the SCCM PowerShell module loaded (which comes installed on the SCCM server).

Or, if you’ve got a CSV list:

$Computers = Import-Csv "C:\ListOfComputers.csv"
foreach ($computer in $Computers) {
    Get-CMDevice -Name $computer.Name
}

It’s a super slick way to automate repetitive tasks. PowerShell for the win!

Option 3: Temporary Collection Magic

This is perfect if you’re going to keep interacting with these computers. You can create a device collection in SCCM based on direct membership or an import.

Here’s how:

  • Get your list of hostnames into a text or CSV file.
  • In SCCM, head to Assets and Compliance > Device Collections.
  • Right-click and choose Create Device Collection.
  • Give it a cool name. Something like “Hotfix_targets_June”.
  • Select Import Direct Membership.
  • Paste in or browse to your list of machines.
  • Finish the wizard and you’ll have a handy group to work with.

Create once, reuse forever. Collections are a major productivity hack.

Option 4: Use CM Pivot

If you have SCCM 1806 or later, CM Pivot is your secret weapon. It allows real-time querying of devices. You can also use filters and look for specific machines actively reporting data.

Here’s how it works:

  1. Go to Assets and Compliance then look up a collection or device.
  2. Right-click and select Start CMPivot.
  3. You can use syntax like this to look for multiple devices:
Device | where (Device == "PC001" or Device == "PC002" or Device == "PC003")

Cool part? You get real-time results. As in, you’ll know who’s up, who’s offline, and more.

Tips to Make Your Life Easier

  • Keep hostnames in a shareable CSV or text format.
  • Use Notepad++ to easily turn a list into a query-friendly format.
  • Make collections out of frequently used groups.
  • Create script snippets that you can copy-paste with updated names.

Gotchas to Watch Out For

Not everything is sunshine and rainbows in SCCM land. Here are some things to look out for:

  • Typo in hostnames = zero results.
  • Devices not reported in = missing results.
  • Certain actions may only work on “online” devices.
  • Stale objects might look active but aren’t.

Always verify the full computer name. Some entries have prefixes or domain suffixes.

Bonus: Use Scripts in Console

SCCM has a handy dandy ‘Run Script’ feature. If you’ve already made a collection of your hostnames, you can select it and run a custom script directly on those devices.

Run a script like:

hostname

And get immediate feedback. It’s like pinging, but fifty times faster (and cooler looking).

Final Thoughts

Yes, SCCM doesn’t let you multiselect in the search bar natively. But SCCM is all about creativity. Whether you prefer custom queries, PowerShell, or collections, there’s a method for you.

Learning a few of these tricks will save loads of time. You’ll navigate SCCM like a pro and impress your team with lightning-fast searches. And hey, maybe you’ll even get out of work on time today. Maybe.

Happy searching!

Scroll to Top
Scroll to Top