Messing with otherWellKnownObjects
otherWellKnownObject attributes have been widely used in HMC as a cross reference as well as very much as a kind of a poor man’s AD schema extension strategy. J This blog aims to discuss it and also provide some ways to work with this attribute using HMC procedures.
Firstly, here is a list of common otherWellKnownObjectGUID in HMC,
List of common otherWellKnownObjectGUID in HMC
- 7DEF010C6019A1458068D74AD1A3C1FA
- name="FolderUsers"
- Eg.:CN=FolderUsers@alpineskihouse.com,OU=ALPINESKIHOUSE,OU=CONSOLIDATEDMESSENGER,OU=Hosting,DC=fabrikam,DC=com
- A276E3A170F0C24699770F593818501E
- name="FolderAdmins"
- Eg.:CN=FolderAdmins@alpineskihouse.com,OU=ALPINESKIHOUSE,OU=CONSOLIDATEDMESSENGER,OU=Hosting,DC=fabrikam,DC=com
- D22DFCC5B73645E99E16C9AD3D61F34F
- name="OfflineAddressList"
- Eg.:CN=ALPINESKIHOUSE OAL,CN=All Offline Address Lists,CN=Address Lists Container,CN=HMC45,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=fabrikam,DC=com
- 9E444526CB6F4D5C9A59C9A84E26B627
- name="AddressList"
- Eg.:CN=ALPINESKIHOUSE AL,CN=All Address Lists,CN=Address Lists Container,CN=HMC45,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=fabrikam,DC=com
- 89FB25B7DF784FC198A493E2E8A0EE7E
- name="GlobalAddressList"
- Eg.:CN=ALPINESKIHOUSE GAL,CN=All Global Address Lists,CN=Address Lists Container,CN=HMC45,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=fabrikam,DC=com
- 4619BE598BF441DB8C9DB0482E62E386
- name="MultiGroupPointer"
- Eg.:CN=MultiGroup,CN=_Private,OU=ALPINESKIHOUSE,OU=CONSOLIDATEDMESSENGER,OU=Hosting,DC=fabrikam,DC=com
- EA755D448CE64157A20E82B7CCBE14B0
- name="OrgType"
- Eg.:CN=customer,CN=WatOrgTypes,CN=_Private,OU=Hosting,DC=fabrikam,DC=com
- 3B6FF4FA8AA248039AD8F9493A43B704
- name="ChildOrgCreators"
- Eg.:CN=CSRAdmins@alpineskihouse.com,OU=ALPINESKIHOUSE,OU=CONSOLIDATEDMESSENGER,OU=Hosting,DC=fabrikam,DC=com
- 65F37ECB46704F0E9300E1FB48E1096E
- name="UserCreators"
- Eg.:CN=Admins@alpineskihouse.com,OU=ALPINESKIHOUSE,OU=CONSOLIDATEDMESSENGER,OU=Hosting,DC=fabrikam,DC=com
- 58888CFC8F7F430C8183102CD5758D81
- name="ForeignOwnerOrg"
- Eg.: OU=CONSOLIDATEDMESSENGER,OU=Hosting,DC=fabrikam,DC=com
- CC016CF08DEF4EA4A05C9C54B198785A
- name="ThisOrganizationRoot"
- Eg.:OU=ALPINESKIHOUSE,OU=CONSOLIDATEDMESSENGER,OU=Hosting,DC=fabrikam,DC=com
How to reset the otherWellKnownObject using HMC procedure
Sometimes, you may find it necessary to reset the otherWellKnownObject for whatever reason such as you may accidentally remove the Offline Address Book. This may result in the otherWellKnownObject reference to be invalid.
You can set or reset the otherWellKnownObject attribute by running the following procedure,
Sample Request:
<request> <procedure name="SetOtherWellKnownObject" description="Set WKO" access="private" type="write" perfEnabled="0" saveDataForRollback="0" auditEnabled="0"> <procedureData> <path>LDAP://OU=alpineskihouse,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com</path> <GUID>9E444526CB6F4D5C9A59C9A84E26B627</GUID> <referent>LDAP://CN=Alpineskihouse AL,CN=All Address Lists,CN=Address Lists Container,CN=HMC45,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=fabrikam,DC=com</referent> <preferredDomainController>AD01.fabrikam.com</preferredDomainController> </procedureData> <before source="data" destination="procedureData" mode="insert"/> <execute namespace="Managed Active Directory" procedure="SetOtherWellKnownObject_" impersonate="2"> <before source="procedureData" sourcePath="path" destination="executeData"/> <before source="procedureData" sourcePath="GUID" destination="executeData"/> <before source="procedureData" sourcePath="referent" destination="executeData"/> <before source="procedureData" sourcePath="preferredDomainController" destination="executeData"/> </execute>
</procedure> </request> |
If you wish to clear it, you just don’t set anything on the referent.
How to retrieve the otherWellKnownObject using HMC procedure
<request> <procedure name="GetOtherWellKnownObject" description="Get WKO" access="private" type="write" perfEnabled="0" saveDataForRollback="0" auditEnabled="0"> <procedureData> <GUID>9E444526CB6F4D5C9A59C9A84E26B627</GUID> <object>LDAP://OU=Alpineskihouse,OU=ConsolidatedMessenger,OU=Hosting,DC=Fabrikam,DC=com </object> <preferredDomainController>AD01.fabrikam.,com</preferredDomainController> </procedureData>
<execute namespace="Managed Active Directory" procedure="GetOtherWellKnownObject" impersonate="2"> <before source="procedureData" sourcePath="object" destination="executeData"/> <before source="procedureData" sourcePath="GUID" destination="executeData"/> <before source="procedureData" sourcePath="preferredDomainController" destination="executeData"/> </execute>
</procedure> </request> |
Sample VBScript to retrieve otherWellKnownObject
strDomain = "fabrikam.com" strWKGUID = "D22DFCC5B73645E99E16C9AD3D61F34F" set oab = GetObject("LDAP://<WKGUID=" & _ strWKGUID & "," & _ "OU=alpineskihouse,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=com" & ">" ) WScript.Echo oab.Get("distinguishedName") |
Sample PowerShell to retrieve otherWellKnownObject
# The following script will retrieve all the OABs of each OU $LDAP = "OU=Hosting,dc=hmc45, dc=com" $preferredDC = "AD01.fabrikam.com" $domain = "LDAP://" + $LDAP $directoryEntry = New-Object System.DirectoryServices.DirectoryEntry $domain $strWKGUID = "D22DFCC5B73645E99E16C9AD3D61F34F" $query = new-object system.directoryservices.directorysearcher $query.SearchRoot = $directoryEntry $query.PageSize = 1000 $query.filter = ("(objectClass=organizationalUnit)") $orgs = $query.findAll() Foreach($org in $orgs) { $org = $org.GetDirectoryEntry() $orgDN = $org.distinguishedName $orgName = $org.name $oab = New-Object DirectoryServices.DirectoryEntry "LDAP://<WKGUID=$strWKGUID,$orgDN>" If($oab.name -ne $null) { "Org DN: $orgDN, " "OAB: " + $oab.name
"------------------------------------------" " " } } |
Comments
- Anonymous
February 14, 2016
hai, I just want to tell you that I am just very new to blogs and seriously loved this website. More than likely I’m planning to bookmark your blog post .
You amazingly come with really good posts. Thanks a lot for sharing your blog Microsoft.
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Aceh
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Bali
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Balikpapan
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Bandung
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Banjarmasin
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Banten
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Batam
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Bekasi
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Bengkulu
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Bogor
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Bontang
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Cianjur
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Cikarang
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Cilegon
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Cirebon
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Denpasar
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Jakarta
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Jambi
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Jember
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Karawang
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Kendal
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Kudus
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Kupang
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Lampung
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Madiun
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Makasar
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Malang
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Maluku
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Manado
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Medan
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20NTT
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Padang
http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20BUMN
http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Terbaru
http://www.lokerjobindo.com
http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Serang
http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Tangerang