welcome System Center 2007!

System Center Operations manager 2007 in Egypt

قُل لّوْ كَانَ الْبَحْرُ مِدَاداً لّكَلِمَاتِ رَبّي لَنَفِدَ الْبَحْرُ قَبْلَ أَن تَنفَدَ كَلِمَاتُ رَبّي وَلَوْ جِئْنَا بِمِثْلِهِ مَدَداً

Friday, November 16, 2007

List Local Group using OpsMgr 2007 Task

you can list all local groups on your server using a simple task in operations manager
use the script below to create your task

On Error Resume Next
strComputer = "."Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_Group Where LocalAccount = True")
For Each objItem in colItems

Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "SID: " & objItem.SID
Wscript.Echo "-------------------Tarek-----------------------"
Next