Category Archives: Scripts

AD Administration with PowerShell

Windows 2008 R2 AD has a build-in feature  ADMGS (Active Directory Management Gateway Service) to enable administrators to use the Active Directory module via PowerShell, but Windows 2003 SP2 and 2008 SP2 AD does not have it.  Microsoft has released ADWS (Active … Continue reading

Posted in AD, Scripts | Leave a comment

Powershell for Exchange 2007

Testing Exchange 2007 With PowerShell  http://www.msexchange.org/articles-tutorials/exchange-server-2007/monitoring-operations/testing-exchange-2007-powershell-part1.html [Jonson] detail list down all those Test-xxx Cmdlet for E2K7 testing …  

Posted in Exchange 2007, MS Exchange, Scripts | Leave a comment

LDAP – QUery Others 2

sAMAccountType Name Value   SAM_DOMAIN_OBJECT 0x0   SAM_GROUP_OBJECT 0x10000000 268435456 SAM_NON_SECURITY_GROUP_OBJECT 0x10000001 268435457 SAM_ALIAS_OBJECT 0x20000000 536870912 SAM_NON_SECURITY_ALIAS_OBJECT 0x20000001 536870913 SAM_USER_OBJECT 0x30000000 805306368 SAM_NORMAL_USER_ACCOUNT 0x30000000 805306368 SAM_MACHINE_ACCOUNT 0x30000001 805306369 SAM_TRUST_ACCOUNT 0x30000002 805306370 SAM_APP_BASIC_GROUP 0x40000000 1073741824 SAM_APP_QUERY_GROUP 0x40000001 1073741825 SAM_ACCOUNT_TYPE_MAX 0x7fffffff 2147483647 … Continue reading

Posted in Scripts | Leave a comment

LDAP – Query others 1

creator: stringThe person that created the object. modifyTimeStampThe date when this object was last changed. This value is replicated. createTimeStampThe date when this object was created. This value is replicated. whenCreated: 20021023015022.0ZThe date when this object was created. This value … Continue reading

Posted in Scripts | Leave a comment

LDAP – Exchange Query

Mailbox enabled users (&(objectCategory=person)(objectClass=user)(mailnickname=*)(|(homeMDB=*)(msExchHomeServerName=*))) Mail enabled users(&(objectCategory=person)(objectClass=user)(mailnickname=*)(targetAddress=*)) Users with Email Proxy Enabled (&(objectcategory=person)(objectClass=user)(proxyAddresses=*givenProxyAddress*)) Users Hidden from Exchange Address Lists (&(objectCategory=person)(objectClass=user)(mailnickname=*)(|(homeMDB=*)(msExchHomeServerName=*)(targetAddress=*))(msExchHideFromAddressLists=TRUE)) Default Deleted Item Retentions (& (objectCategory=person)(objectClass=user)(mailnickname=*)(|(!deletedItemflags=*)(!deletedItemflags>=0))) Deleted Item Retention Limits (&(objectCategory=person)(objectClass=user)(mailnickname=*)(deletedItemflags= *)(!deletedItemflags<=0)) Default Storage Limit Report (&(objectCategory=person)(objectClass=user)(mDBUseDefaults=TRUE)) Mailbox Size Limits … Continue reading

Posted in Scripts | Leave a comment

LDAP – Computer Query

All Computers (&(objectcategory=computer)(objectClass=computer)) Windows XP Computers(&(sAMAccountType=805306369)(objectCategory=computer)(operatingSystem=Windows XP*)) Windows Server 2003(&(sAMAccountType=805306369)(objectCategory=computer)(operatingSystem=*Server 2003)) Windows 2000 Server(&(sAMAccountType=805306369)(objectCategory=computer)(operatingSystem=Server 2000*)) Windows NT(&(sAMAccountType=805306369)(objectCategory=computer)(operatingSystem=Windows NT*)) Windows 2000(&(sAMAccountType=805306369)(objectCategory=computer)(operatingSystem=Windows 2000*)) Windows Server 2003 no Service Packs(&(sAMAccountType=805306369)(objectCategory=computer)(operatingSystem=*Server 2003)(!operatingSystemServicePack=*)) Vista SP1 computers(&(sAMAccountType=805306369)(objectCategory=computer)(operatingSystem=Windows Vista*)(operatingSystemServicePack=Service Pack 1)) Recently Modified Computers "(&(objectCategory=computer)(objectClass=computer)(modifyTimeStamp>=givenTime) )" Recently Deleted … Continue reading

Posted in Scripts | Leave a comment

LDAP – Group Query

All Groups (objectCategory=group) Groups without Members (&(objectCategory=group)(!member=*)) Managed Groups (&(objectCategory=group)(managedby=*)) Unmanaged Groups (&(objectCategory=group)(!managedby=*)) Security Groups (&(objectCategory=group)(groupType:1.2.840.113556.1.4.804:=2147483648)) Distribution Groups (&(objectCategory=group)(!groupType:1.2.840.113556.1.4.804:=2147483648)) OR (&(objectCategory=group)(sAMAccountType=268435457)) Universal Groups (groupType:1.2.840.113556.1.4.803:=8) Empty Groups (objectCategory=group)(!member=*) Mail Enabled Groups(&(objectCategory=group)(mail=*)(!sAMAccountType=268435457)) Reference:. LDAP tips #2: Searching for Groups

Posted in Scripts | Leave a comment