Quote Originally Posted by jlewter View Post
I am looking for a good way to list accounts in our GroupWise system that has shared folders under it. We have allot of accounts that are no longer around and want to remove them, but first want to make sure there aren't shared folders tied to them. Once I can list out the accounts that have shared folders, we can decide if they still used or not and go from there. Looking for suggestions on best way to attack this issue.
This can be done with the GroupWise object API and VBScript. This code when run using cscript.exe will list the shared and with which they are shared for the currently logged in GroupWise account. I have not tested this using GroupWise 2012 but it works well with GroupWise 8.x.

listFolders.vbs

option explicit

dim GWApplication
dim GWAccount

set GWApplication = CreateObject("NovellGroupwareSession")
set GWAccount = GWApplication.Login()

WalkFolders GWAccount.RootFolder, ""

set GWAccount = Nothing

sub WalkFolders (Folder, PathName)

dim i

if Folder.Folders.Count > 0 then
for i = 1 to Folder.Folders.Count
wscript.echo PathName & "/" & Folder.Folders.Item(i).name
walkFolders Folder.Folders.Item(i), PathName & "/" & Folder.Folders.Item(i).name
next
end if

end sub

The output is comma separated value and can be redirected into a file which can be imported into a spreadsheet or database for analysis and reporting.

Iterating through multiple users is done using a trusted application key and the multilogin method. If there is interest I can post sample code.