thought, "he retired last year"? This script verifies the membership in groups
in the name and addressbook. It generates a simple report showing exceptions.
Put this script in an agent and schedule it or run it manually on command. If
it is scheduled, the report will be saved on the server.
- Server names and wildcards are reported as exceptions.
- Agent must reside in the NAB.
Dim Session As New NotesSession
Dim DB As NotesDatabase
Dim Group As NotesDocument
Dim Person As NotesDocument
Dim ReadPG As NotesDocument
Dim GView As NotesView
Dim PGView As NotesView
Dim fileNum As Integer
FileNum% = Freefile()
Print "Logging output messages to \APPS\NOTES\GROUP.LOG"
Open "group.log" For Output As fileNum%
Print #FileNum%, "Audit Group Agent ", Now ' print a header line to log file
Print "Audit Group Agent ", Now ' print to log db (or to status line if run
Set DB = Session.CurrentDatabase
Set GView = DB.GetView ( "($VIMGroups)" )
Set PGView = DB.GetView ( "($VIMPeopleandGroups)" )
Set Group = GView.GetFirstDocument
Do Until Group Is Nothing
Print #FileNum%, Chr(10) & "Group: " & Group.ListName(0) & " " &
Group.ListDescription(0) & " - - - - - -"
Forall i In Group.Members
Set PersonName = New NotesName( i )
Set ReadPG = PGView.GetDocumentByKey( PersonName.Abbreviated )
If ReadPG Is Nothing Then
Print #FileNum%, " Entry does NOT exist - - " & PersonName.Abbreviated
Print #FileNum%, " " & PersonName.Abbreviated
End Forall ' all members
Set Group = GView.GetNextDocument ( Group )
Loop ' all groups