How To: List all servers used by your ConfigMgr Infrastructure

Here’s a quick PowerShell script to show all servers used in your ConfigMgr Hierarchy:

$myServers  = get-wmiobject  SMS_SystemResourceList `
   -namespace root\sms\site_LAB –computer LABServer
$myServers | select-object servername -unique `
   | sort Servername | out-gridview

You can alter that script a little to show all Roles for each server:

$myServers  = get-wmiobject  SMS_SystemResourceList `
    -namespace root\sms\site_LAB –computer LABServer
$myServers | select-object servername, RoleName  `
    | sort Servername | out-gridview

To run these in your environment, launch in PowerShell with proper rights to query your hierarchy, and replace “LAB” with your Central site ConfigMgr Site Code, and replace LABServer with your Central site server name.

Happy Scripting,

Greg

ramseyg@hotmail.com

About Greg Ramsey
Greg Ramsey, Enterprise Mobility MVP, is a Senior Enterprise Architect at Dell Technologies. He has a B.S. in Computer Sciences and Engineering from Ohio State University and has co-authored many books over the years. Greg is an international speaker, a board member of the Northwest System Center User Group, and the Director of Communications for the Midwest Management Summit.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: