Windows Management

 Introduction

 VBScript Collection (1)
 VBScript Collection (2)
 WSH (Scripting Host)

 WMI

 ADSI

 PowerShell

 Resource Kit (2003)

 Resource Kit (2000)

 Resource Kit (NT4)

 Miscellaneous


ActiveXperts
Network Monitor


 Product Overview

 Built-in checks:
 
 Brochure (.pdf)

 Manual (.pdf)

 Download (.exe)


Some quotes

 
 Windows&.NET Mag.:
 "Small,smart,handy!"
 
 "Extremely easy to use,
  great value for money!"



  ActiveXperts Network Monitor - Home page
  Download ActiveXperts Network Monitor 7.1  (7327 KB - .exe file)

Scripts to manage Local Groups

Adding a User to a Local Group
Creating a Local Group on a Computer
Deleting a Local Group
Deleting a User from a Local Group
Enumerating Local Groups and Their Members
Listing All the Local Groups a User Belongs To




Adding a User to a Local Group


Adds a user (kenmyer) to the local Administrators group on a computer named MyComputer.
strComputer = "MyComputer"
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
Set objUser = GetObject("WinNT://" & strComputer & "/kenmyer,user")
objGroup.Add(objUser.ADsPath)

Creating a Local Group on a Computer


Creates a local group named FinanceUsers on a computer named MyComputer.
strComputer = "MyComputer"
Set colAccounts = GetObject("WinNT://" & strComputer & "")
Set objUser = colAccounts.Create("group", "FinanceUsers")
objUser.SetInfo

Deleting a Local Group


Deletes a local group named FinanceUsers from a computer named MyComputer.
strComputer = "MyComputer"
Set objComputer = GetObject("WinNT://" & strComputer & "")
objComputer.Delete "group", "FinanceUsers"

Deleting a User from a Local Group


Removes kenmyer from the local Administrators group on a computer named MyComputer.
strComputer = "MyComputer"
Set objGroup = GetObject("WinNT://" & strComputer & "/Adminstrators,group")
Set objUser = GetObject("WinNT://" & strComputer & "/kenmyer,user")
 
objGroup.Remove(objUser.ADsPath)

Enumerating Local Groups and Their Members


Returns a list of local groups (and their members) found on a computer named atl-win2k-01.
strComputer = "atl-win2k-01"
Set colGroups = GetObject("WinNT://" & strComputer & "")
colGroups.Filter = Array("group")
For Each objGroup In colGroups
    Wscript.Echo objGroup.Name 
    For Each objUser in objGroup.Members
        Wscript.Echo vbTab & objUser.Name
    Next
Next

Listing All the Local Groups a User Belongs To


Returns a list of all the local groups on the computer atl-win2k-01 that a user named kenmyer belongs to.
strComputer = "atl-win2k-01"
Set colGroups = GetObject("WinNT://" & strComputer & "")
colGroups.Filter = Array("group")
For Each objGroup In colGroups
    For Each objUser in objGroup.Members
        If objUser.name = "kenmyer" Then
            Wscript.Echo objGroup.Name
        End If
    Next
Next

©2009 ActiveXperts Software B.V. All rights reserved.  Contact Us | Terms of Use | Privacy Policy