Server Management - Systems Insight Manager
1825801 Members
2304 Online
109687 Solutions
New Discussion

Re: Modifying a Custom List based on Domain Membership

 
RobSmith
Frequent Advisor

Modifying a Custom List based on Domain Membership

Hi all...I'm trying to create a script that will run from the CMS to do the following.

Based on a selected group of servers, determine their domain, then using that information, create or modify a list for that domain.

What I am trying to achieve is a main list under systems for each domain in our environment.

I have a portion of vbs for getting the domain info, now I just need to figure out how to use that in SIM to edit the lists.

Heres the script I have so far:

strComputer = "computernamehere"

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colDom = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")

For Each i in colDom

WScript.Echo i.Domain

Next
2 REPLIES 2
Derek_56
Valued Contributor

Re: Modifying a Custom List based on Domain Membership

Rob,

I've accomplished what I think you're trying for in our environment without using scripts. You just create a custom list in SIM based off of the 'common attributes' using the fully qualified domain name that you want to base the list on.

For example if you want all servers in the local.xyz.com domain, then create a list where:
'common attributes' CONTAINS local.xyz.com
AND
'system type' IS Server.

You can do this for each domain in your environment. The one caveat here is that DNS is working and configured in your environment and was at the time your systems were discovered by SIM.

Hope this is what you are looking for. Good luck.
Derek
RobSmith
Frequent Advisor

Re: Modifying a Custom List based on Domain Membership

That would work, but unfortunately, most of the systems were added via a dump from ad, by hostname only, and not fqdn. Thanks anyways for the reply!

Anyone else have an idea?