Application Delivery Management
Application Modernization & Connectivity
CyberRes by OpenText
IT Operations Management
listSystemInfo.vbs
Option Explicit
const DomainPath = "k:\dom1"
dim GWSystem
'create the object and connect to the domain
set GWSystem=CreateObject("NovellGroupWareAdmin")
GWSystem.Connect( DomainPath )
'output the system information
wscript.echo GWSystem.Name & "," _
& GWSystem.APIMajorVersion & "," _
& GWSystem.APIMinorVersion & "," _
& GWSystem.LastModifiedBy
c:\gwscripts>cscript /nologo listSystemInfo.vbs
MYCOMPANYGW,2,0,(MYCOMPANYTREE) admin.MyCompany
listDomains.vbs
option explicit
const DomainPath = "k:\dom1"
dim GWSystem
dim GWDomain
'create the object and connect to the domain
set GWSystem=CreateObject("NovellGroupWareAdmin")
GWSystem.Connect( DomainPath )
'iterate through the collection of domains and output some domain properties
for each GWDomain in GWSystem.Domains
wscript.echo GWDomain.Name & "," _
& GWDomain.Description & "," _
& GwDomain.DomainType & "," _
& GwDomain.Path
next
c:\gwscripts>cscript /nologo listDomains.vbs
pridom,Primary domain used for administration,2,\\fs01\vol1\gwdomain
nyc,New York,1,\\fs02\vol1\gwdomain
la,Los Angeles,1\\fs03\vol1\gwdomain
listPostOffices.vbs
option explicit
const DomainPath = "k:\dom1"
dim GWSystem
dim GWPostOffice
'create the object and connect to the domain
set GWSystem=CreateObject("NovellGroupWareAdmin")
GWSystem.Connect( DomainPath )
'iterate through the collection of post offices and output some post office properties
for each GWPostOffice in GWSystem.PostOffices
wscript.echo GWPostOffice.Name & "," _
& GWPostOffice.Description & "," _
& GWPostOffice.Path
next
c:\gwscripts>cscript /nologo listPostOffices.vbs
acct,Accounting,\\fs04\vol1\gwacct
corp,Corporate,\\fs05\vol1\gwcorp
eng,Engineering,\\fs06\vol1\gweng
hr,Human Resources,\\fs07\gwhr
infosys,Information Systems,\\fs08\gwinfosys
listUsers.vbs
option explicit
const DomainPath = "k:\dom1"
dim GWSystem
dim GWUser
'create the object and connect to the domain
set GWSystem=CreateObject("NovellGroupWareAdmin")
GWSystem.Connect( DomainPath )
'iterate through the collection of users and output some user properties
for each GWUser in GWSystem.Users
wscript.echo GWUser.Name & "," _
& GWUser.Surname & "," _
& GWUser.GivenName & "," _
& GWUser.Title & "," _
& GWUser.Department & "," _
& GWUser.PhoneNumber & "," _
& GWUser.FaxNumber & "," _
& GWUser.MailboxID 'aka the file identifier
next
c:\gwscripts>cscript /nologo listPostOffices.vbs
enate,Nate,Emma,Vice President,Human Resources,555-1028,555-1234,7xb
jwalker,Walker,Jay,Senior Engineer,Engineering,555-1010,555-1234,eds
planders,Landers,Phil,Programmer,Information Systems,555-1086,555-1234,f93
listNonVisibleUsers.vbs
'list all user accounts with visibility set to None.
option explicit
const DomainPath = "k:\dom1"
'define constants as used in the the API documentation
const eadVisPostOffice = 1
const eadVisSystem = 2
const eadVisDomain = 3
const eadVisNone = 4
dim GWSystem
dim GWUser
'create the object and connect to the domain
set GWSystem=CreateObject("NovellGroupWareAdmin")
GWSystem.Connect( DomainPath )
'iterate through the collection of users and output users with visibility set to none
for each GWUser in GWSystem.Users
if GWUser.Visibility = eadVisNone then
wscript.echo GWUser.Name & "," _
& GWUser.Surname & "," _
& GWUser.GivenName & "," _
& GWUser.Title & "," _
& GWUser.Department & "," _
& GWUser.PhoneNumber & "," _
& GWUser.FaxNumber & "," _
& GWUser.MailboxID
end if
next
listExpiredUsers.vbs
'list all accounts where login is disabled the account is expired.
' note: the value returned for accounts without an expiration date is zero
option explicit
const DomainPath = "k:\dom1"
dim GWSystem
dim GWUser
set GWSystem=CreateObject("NovellGroupWareAdmin")
GWSystem.Connect( DomainPath )
'iterate through the collection of users and output users with login disabled or an expiration date greater than zero and less than today
for each GWUser in GWSystem.Users
if GWUser.DisableLogin = True _
or ( GWUser.MailBoxExpDate < now() _
and GWUser.MailBoxExpDate > 0 ) then
wscript.echo GWUser.Name & "," _
& GWUser.Surname & "," _
& GWUser.GivenName & "," _
& GWUser.Title & "," _
& GWUser.Department & "," _
& GWUser.PhoneNumber & "," _
& GWUser.FaxNumber & "," _
& GWUser.MailboxID & "," _
& GWUser.MailBoxExpDate
end if
next
hscope,Scope,Horrace,Benefits Specialist,Human Resources,555-1034,555-1234,1n6,27/05/2
011 3:37:00 PM
lprice,Price,Lois,Purchaser,Accounting,555-1034,555-1234,7xb,12:00:00 AM