Login | |
|
 |
Re: Exchange Mailbox using vbscript - 2/18/2005 2:49:23 AM
|
|
 |
|
| |
tnoonan
Posts: 364
Score: 0
Joined: 12/14/2004
From:
Status: offline
|
Option Explicit ' ------------------------------------------------------------------------ Function EnumMailboxStore (urlMailboxStoreDB) ' -------------------------------------------------------------------- WScript.Echo Space (intX + 1) & _ "Retrieving User/mailbox list via 'ADSI/ADO' LDAP Query." ' Search Active Directory for the list of user mailboxes. Set objResultList = ADSearch ("LDAP://" & strDefaultDomainNC, _ "(homeMDB=" & urlMailboxStoreDB & ")", _ "ADsPath", _ "subTree", _ False) ' -------------------------------------------------------------------- objResult = objResultList.Items For intIndice = 1 to (objResultList.Count - 1) Set objUser = GetObject (objResult (intIndice)) objUser.GetInfo ' Getting two properties for display facilities. strAlias = objUser.Get ("mailNickName") strDisplayName = objUser.Get ("displayName") strTemp = "" : strTemp = objUser.AccountDisabled DisplayText "AccountDisabled(ADSI)", strTemp strTemp = "" : strTemp = objUser.AccountExpirationDate DisplayText "AccountExpirationDate(ADSI)", strTemp ' objUser.BadLoginAddress strTemp = "" : strTemp = "(Not supported in LDAP namespace)" DisplayText "BadLoginAddress(ADSI)", strTemp strTemp = "" : strTemp = objUser.BadLoginCount DisplayText "BadLoginCount(ADSI)", strTemp strTemp = "" : strTemp = objUser.Department DisplayText "Department(ADSI)", strTemp DisplayText "FirstName(ADSI)", strTemp strTemp = "" : strTemp = objUser.FullName DisplayText "FullName(ADSI)", strTemp ' objUser.GraceLoginsAllowed strTemp = "" : strTemp = "(Not supported in LDAP namespace)" DisplayText "GraceLoginsAllowed(ADSI)", strTemp ' objUser.GraceLoginsRemaining strTemp = "" : strTemp = "(Not supported in LDAP namespace)" DisplayText "GraceLoginsRemaining(ADSI)", strTemp strTemp = "" : strTemp = objUser.HomeDirectory DisplayText "HomeDirectory(ADSI)", strTemp strTemp = "" : strTemp = objUser.HomePage DisplayText "HomePage(ADSI)", strTemp ' objUser.IsAccountLocked strTemp = "" : strTemp = "(Not supported in LDAP namespace)" DisplayText "IsAccountLocked(ADSI)", strTemp strTemp = "" : strTemp = objUser.Languages DisplayText "Languages(ADSI)", strTemp strTemp = "" : strTemp = objUser.LoginScript DisplayText "LoginScript(ADSI)", strTemp strTemp = "" : strTemp = objUser.LoginWorkstations DisplayText "LoginWorkstations(ADSI)", strTemp strTemp = "" : strTemp = objUser.Manager DisplayText "Manager(ADSI)", strTemp ' objUser.MaxLogins strTemp = "" : strTemp = "(Not supported in LDAP namespace)" DisplayText "MaxLogins(ADSI)", strTemp strTemp = "" : strTemp = objUser.OtherName DisplayText "OtherName(ADSI)", strTemp ' objUser.PasswordExpirationDate strTemp = "" : strTemp = "(Not supported in LDAP namespace)" DisplayText "PasswordExpirationDate(ADSI)", strTemp strTemp = "" : strTemp = objUser.PasswordLastChanged DisplayText "PasswordLastChanged(ADSI)", strTemp ' objUser.PasswordMinimumLength strTemp = "" : strTemp = "(Not supported in LDAP namespace)" DisplayText "PasswordMinimumLength(ADSI)", strTemp strTemp = "" : strTemp = objUser.PasswordRequired strTemp = "" : strTemp = objUser.Profile DisplayText "Profile(ADSI)", strTemp ' objUser.RequireUniquePassword strTemp = "" : strTemp = "(Not supported in LDAP namespace)" DisplayText "RequireUniquePassword(ADSI)", strTemp strTemp = "" : strTemp = objUser.SeeAlso DisplayText "SeeAlso(ADSI)", strTemp strTemp = "" : strTemp = objUser.TelephoneHome strTemp = "" : strTemp = objUser.TelephonePager DisplayText "TelephonePager(ADSI)", strTemp strTemp = "" : strTemp = objUser.Title DisplayText "Title(ADSI)", strTemp ' At this level of the object hierarchy, you can determine ' the group membership, and set and change the password ' of a user object. ' objUser.Groups ' objUser.SetPassword ' objUser.ChangePassword DisplayText "Data retrieved via 'IMailboxStore CDOEXM' interface", "" DisplayText "DaysBeforeGarbageCollection(CDOEXM)", _ objUser.DaysBeforeGarbageCollection DisplayText "EnableStoreDefaults(CDOEXM)", _ objUser.EnableStoreDefaults DisplayText "GarbageCollectOnlyAfterBackup(CDOEXM)", _ objUser.GarbageCollectOnlyAfterBackup DisplayText "Hardlimit(CDOEXM)", objUser.Hardlimit DisplayText "HomeMDB(CDOEXM)", objUser.HomeMDB DisplayText "OverQuotaLimit(CDOEXM)", objUser.OverQuotaLimit DisplayText "OverrideStoreGarbageCollection(CDOEXM)", _ objUser.OverrideStoreGarbageCollection DisplayText "RecipientLimit(CDOEXM)", objUser.RecipientLimit DisplayText "StoreQuota(CDOEXM)", objUser.StoreQuota For Each strDelegate In objUser.Delegates DisplayText "Delegate(CDOEXM)", strDelegate Next ' At this level of the object hierarchy, you can create, move, ' or delete a mailbox from the mailbox store. ' objUser.CreateMailBox ' objUser.DeleteMailBox ' objUser.MoveMailBox ' End Function ' End
|
|
| |
|
|
|
|
|