Code Script .co.uk

Home | Scripts | Tutorials | Disclaimer | Sitemap | Contact

   Public Folder Properties
 

Vbscript / Exchange / Public Folder Properties

Public Folder information


Set objFSO = CreateObject("Scripting.FileSystemObject")

logName = "PFInfo.tsv"

strComputer = "exchsvr01"

strHeaders = "Address book name" & vbTab &_
     "Administrative note" & vbTab &_
     "Administrative security descriptor" & vbTab &_
     "Active Directory proxy path" & vbTab &_
     "Associated messgae count" & vbTab &_
     "Attachment count" & vbTab &_
     "Categorization count" & vbTab &_
     "Comment" & vbTab &_
     "Contact count" & vbTab &_
     "Contains rules" & vbTab &_
     "Creation time" & vbTab &_
     "Deleted item lifetime" & vbTab &_
     "Folder tree" & vbTab &_
     "Friendly URL" & vbTab &_
     "Has children" & vbTab &_
     "Has local replica" & vbTab &_
     "Is mail enabled" & vbTab &_
     "Is normal folder" & vbTab &_
     "Is search folder" & vbTab &_
     "Is secure in site" & vbTab &_
     "Last access time" & vbTab &_
     "Last modification time" & vbTab &_
     "Maximum item size" & vbTab &_
     "Message count" & vbTab &_
     "Message with attachments count" & vbTab &_
     "Name" & vbTab &_
     "Normal message size" & vbTab &_
     "owner count" & vbTab &_
     "Parent friendly URL" & vbTab &_
     "Path" & vbTab &_
     "Prohibit post limit" & vbTab &_
     "Publish in address book" & vbTab &_
     "Recipiejt count on associated messages" & vbTab &_
     "Recipient count on normal messages" & vbTab &_
     "Replica age limit" & vbTab &_
     "Replication message priority" & vbTab &_
     "Replication schedule" & vbTab &_
     "Replication style" & vbTab &_
     "Replication count" & vbTab &_
     "Security descriptor" & vbTab &_
     "Storage limit style" & vbTab &_
     "Target address" & vbTab &_
     "Total message size /B" & vbTab &_
     "URL" & vbTab &_
     "Use public store age limits" & vbTab &_
     "Use public store deleted item lifetime" & vbTab &_
     "Warning limit, "

'Create log titles if file not present
If objFSO.FileExists(logName) = 0 Then
Set objLogFile = objFSO.OpenTextFile(logName, 8, True)
objLogFile.WriteLine(strHeaders)
Else
'Open log for writing (create if nonexistent)
Set objLogFile = objFSO.OpenTextFile(logName, 8)
End If


Set objWMIService = GetObject("winmgmts:" _
    &  "{impersonationLevel=impersonate}!\" & strComputer &_
        "ROOTMicrosoftExchangeV2")

Set colItems = objWMIService.ExecQuery _
    ("Select * from Exchange_PublicFolder")

For Each objItem in colItems


strInfo = objItem.AddressBookName & vbTab &_
objItem.AdministrativeNote  & vbTab &_
objItem.AdminSecurityDescriptor      & vbTab &_
objItem.ADProxyPath      & vbTab &_
objItem.AssociatedMessageCount      & vbTab &_
objItem.AttachmentCount      & vbTab &_
objItem.CategorizationCount   & vbTab &_
objItem.Comment     & vbTab &_
objItem.ContactCount    & vbTab &_
objItem.ContainsRules    & vbTab &_
objItem.CreationTime     & vbTab &_       
objItem.DeletedItemLifetime     & vbTab &_
objItem.FolderTree     & vbTab &_
objItem.FriendlyURL     & vbTab &_
objItem.HasChildren     & vbTab &_
objItem.HasLocalReplica     & vbTab &_
objItem.IsMailEnabled     & vbTab &_
objItem.IsNormalFolder     & vbTab &_
objItem.IsSearchFolder     & vbTab &_
objItem.IsSecureInSite     & vbTab &_
objItem.LastAccessTime      & vbTab &_
objItem.LastModificationTime     & vbTab &_
objItem.MaximumItemSize     & vbTab &_
objItem.MessageCount      & vbTab &_
objItem.MessageWithAttachmentsCount     & vbTab &_
objItem.Name      & vbTab &_
objItem.NormalMessageSize     & vbTab &_
objItem.OwnerCount      & vbTab &_
objItem.ParentFriendlyURL     & vbTab &_
objItem.Path      & vbTab &_
objItem.ProhibitPostLimit      & vbTab &_
objItem.PublishInAddressBook      & vbTab &_
objItem.RecipientCountOnAssociatedMessages      & vbTab &_
objItem.RecipientCountOnNormalMessages      & vbTab &_
objItem.ReplicaAgeLimit      & vbTab &_
objItem.ReplicationMessagePriority      & vbTab &_
objItem.ReplicationSchedule      & vbTab &_
objItem.ReplicationStyle      & vbTab &_
objItem.RestrictionCount      & vbTab &_
objItem.SecurityDescriptor      & vbTab &_
objItem.StorageLimitStyle      & vbTab &_
objItem.TargetAddress      & vbTab &_
objItem.TotalMessageSize      & vbTab &_
objItem.URL      & vbTab &_
objItem.UsePublicStoreAgeLimits      & vbTab &_
objItem.UsePublicStoreDeletedItemLifetime      & vbTab &_
objItem.WarningLimit

objLogFile.WriteLine(strInfo)

Next

Add Comment
Your Name:
Comment:


- Add User To Group
- Create Group
- Enumerate Registry Keys
- Windows Vista Start Menu Program List
- Windows Vista Control Panel Applet List
- Windows OS
- Create Remote File Share
- Set Internet Explorer Homepage
- VBS
- VBScript




Please note that a disclaimer applies to any code on this page.
 
   Actions
  Go Back
  Bookmark
  Print Page


   Menu
 
- Links
- Reference
- Script Editors
- Tutorials
- Vbscript
     - Active Directory
     - Exchange
          - Check Exchange Database Whitespace
          - Public Folder Properties
     - Files And Folders
     - General
     - Ms Office
     - Operating System
     - Processes And Services
     - Text Processing
     - User Interaction
     - Web Servers


Keywords: PFInfo, Public Folders, Exchange PF,