Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Mar 29, 2024 11:37 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Tue Dec 16, 2008 10:43 pm 
Offline
Newbie

Joined: Fri Mar 14, 2008 7:11 pm
Posts: 13
Hello,
i search an option to:
search about the size of *.pst -files on all clients - possible?
So that i can look like the harddisk space which clients have very big .pst files.

The reason is to build a very big backup solution for old emails / and new emails.
But we don't know how much disk space wie must calculate for this.

I hope there is an option to insert some script to search the local clients about *.pst and give the file size back.

friendly greedings from geri :-)


Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 18, 2008 9:02 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Bit of a trick one, since the location of the .PST is not fixed (usually in their profile folder, but not always, and some times more than one .PST .. archives for example and additional mail profiles will have additional .PST files). Can anyone think of a simple way to code this?

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 18, 2008 9:57 pm 
Offline
Contributor

Joined: Fri Jul 28, 2006 6:30 am
Posts: 157
Location: London
I've actually had to do this myself before, writing the results to a file on a server. This code snippet should set you on the right path:

[code]' **** LocatePSTFiles sub *************************************************************
' Written by Nick Brown July 2007
' Global Variable Dependency: goLog, goWMI, goFs, gsLastUser, gsComputerName
' ************************************************************************************************
Sub LocatePSTFiles()
goLog.Proc "LocatePSTFiles"
On Error Resume Next

Dim oWMIFiles, oWMIFile, sFile, sFileInfo, oFile, oDrive, sDriveLetter

sFile=gsLastUser & "-" & gsComputerName & ".txt"
'If Not goFS.FileExists("\\MyServer\PSTScanResults\" & sFile) Then
Set oFile=goFS.OpenTextFile ("\\MyServer\PSTScanResults\" & sFile,8,True)

For Each oDrive In goFS.Drives
If oDrive.DriveType=2 Then
sDriveLetter=oDrive.DriveLetter
If Len(sDriveLetter)=1 Then
Set oWMIFiles = goWMI.ExecQuery("Select * from CIM_DataFile Where Extension = 'pst' and Drive = '" & sDriveLetter & ":'")
For Each oWMIFile in oWMIFiles
sFileInfo=gsLastUser & "," & gsComputerName & "," & chr(34) & oWMIFile.Drive & oWMIFile.Path & oWMIFile.FileName & "." & oWMIFile.Extension & Chr(34) & "," & oWMIFile.FileSize
oFile.WriteLine sFileInfo
Next
End If
End If
Next
'End If

goLog.ErrCheck "LocatePSTFiles"
End Sub
[/code]

_________________
Cheers, Nick.

[size=85]OA Server: Windows Server 2003 / Apache 2
Auditing: 1600 Workstations, 200 Servers
OS's: Windows XP / Windows 2000 / Windows 2003 Server / Windows Vista
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group