PreferredLanguage Active Directory Attribute?

TechTalkz.com - Technology and Computer Help Forums
  • Home
  • Forums
  • Blog
  • Guides User Guides
  • Tips Tips 'n' Tricks
  • Error DB
  • Ask an Expert? General Q&A Hardware Support Software Support
Log in Register What's new Menu Log in Register Install the app Install How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

  • Home
  • Forums
  • Tech Support Archives
  • Microsoft
  • Windows Server 2003
You are using an out of date browser. It may not display this or other websites correctly.You should upgrade or use an alternative browser. preferredLanguage Active Directory attribute?
  • Thread starter Claude Lachapelle
  • Start date May 22, 2008
C

Claude Lachapelle

Guest
Hi! I need to know where this field is accessible, since I could not find it from ADUC? We need to populate it with user spoken language (Active Directory will be used by a support application that will uses this field to determine in which language we should give support to the user). Actually, I will automatically populate this field with a VBScript (with human resources information), but in the future we will need to maintain this field when working with users properties. Thanks. Claude Lachapelle Systems Administrator, MCSE Thanks. J

Jorge Silva

Guest
Hi For example, using adsiedit.msc you can find it under the object properties. http://msdn.microsoft.com/en-us/library/cc198938.aspx -- I hope that the information above helps you. Have a Nice day. Jorge Silva MCSE, MVP Directory Services A

Allan

Guest
If you are just going to edit a few users, I would use adsiedit.msc. It is pretty easy to do it from there. If you want to do a mass edit, you can use a script like the following: Const ADS_SCOPE_SUBTREE = 2 Set objConnection = CreateObject("ADODB.Connection") Set objCommand = CreateObject("ADODB.Command") objConnection.Provider = "ADsDSOObject" objConnection.Open "Active Directory Provider" Set objCommand.ActiveConnection = objConnection objCommand.CommandText = _ "Select distinguishedName from 'LDAP://OU=Us,DC=domain,DC=com' " _ & "where objectClass='user' and objectCategory='person'" objCommand.Properties("Page Size") = 1000 objCommand.Properties("Timeout") = 30 objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE objCommand.Properties("Cache Results") = False Set rsUsers = objCommand.Execute rsUsers.MoveFirst Do Until rsUsers.EOF Set objUser = GetObject("LDAP://" & rsUsers.Fields("distinguishedName").Value) objUser.Put "preferredLanguage", "US English" objUser.SetInfo Loop For individual editing from the MMC, you would have to make a similar script and make a small schema modification. Let me know if this is what you wanted. Thanks, Allan "Claude Lachapelle" <[email protected]> wrote in message news:D[email protected]... > Hi! > > I need to know where this field is accessible, since I could not find it > from ADUC? > > We need to populate it with user spoken language (Active Directory will be > used by a support application that will uses this field to determine in > which > language we should give support to the user). > > Actually, I will automatically populate this field with a VBScript (with > human resources information), but in the future we will need to maintain > this > field when working with users properties. > > Thanks. > > Claude Lachapelle > Systems Administrator, MCSE > > Thanks. C

Claude Lachapelle

Guest
Finally I found a VBscript here (http://www.kouti.com/scripts.htm) for modifying the EmployeeID field which I modified a little bit to have a list of languages displayed and selectables, which set the preferredlanguage attribute. But, I read that is possible to programmatically change the way ADUC is displaying objects, how we could accomplish that? Thanks. "Allan" wrote: > If you are just going to edit a few users, I would use adsiedit.msc. It is > pretty easy to do it from there. > > If you want to do a mass edit, you can use a script like the following: > > Const ADS_SCOPE_SUBTREE = 2 > Set objConnection = CreateObject("ADODB.Connection") > Set objCommand = CreateObject("ADODB.Command") > objConnection.Provider = "ADsDSOObject" > objConnection.Open "Active Directory Provider" > Set objCommand.ActiveConnection = objConnection > objCommand.CommandText = _ > "Select distinguishedName from 'LDAP://OU=Us,DC=domain,DC=com' " _ > & "where objectClass='user' and objectCategory='person'" > objCommand.Properties("Page Size") = 1000 > objCommand.Properties("Timeout") = 30 > objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE > objCommand.Properties("Cache Results") = False > > Set rsUsers = objCommand.Execute > rsUsers.MoveFirst > Do Until rsUsers.EOF > Set objUser = GetObject("LDAP://" & > rsUsers.Fields("distinguishedName").Value) > objUser.Put "preferredLanguage", "US > English" > objUser.SetInfo > Loop > > For individual editing from the MMC, you would have to make a similar script > and make a small schema modification. Let me know if this is what you > wanted. > > Thanks, > Allan > > > "Claude Lachapelle" <[email protected]> wrote in > message news:D[email protected]... > > Hi! > > > > I need to know where this field is accessible, since I could not find it > > from ADUC? > > > > We need to populate it with user spoken language (Active Directory will be > > used by a support application that will uses this field to determine in > > which > > language we should give support to the user). > > > > Actually, I will automatically populate this field with a VBScript (with > > human resources information), but in the future we will need to maintain > > this > > field when working with users properties. > > > > Thanks. > > > > Claude Lachapelle > > Systems Administrator, MCSE > > > > Thanks. > C

Claude Lachapelle

Guest
Thanks for your script, I will use it for mass configuring this attribute from the human resources database. "Allan" wrote: > If you are just going to edit a few users, I would use adsiedit.msc. It is > pretty easy to do it from there. > > If you want to do a mass edit, you can use a script like the following: > > Const ADS_SCOPE_SUBTREE = 2 > Set objConnection = CreateObject("ADODB.Connection") > Set objCommand = CreateObject("ADODB.Command") > objConnection.Provider = "ADsDSOObject" > objConnection.Open "Active Directory Provider" > Set objCommand.ActiveConnection = objConnection > objCommand.CommandText = _ > "Select distinguishedName from 'LDAP://OU=Us,DC=domain,DC=com' " _ > & "where objectClass='user' and objectCategory='person'" > objCommand.Properties("Page Size") = 1000 > objCommand.Properties("Timeout") = 30 > objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE > objCommand.Properties("Cache Results") = False > > Set rsUsers = objCommand.Execute > rsUsers.MoveFirst > Do Until rsUsers.EOF > Set objUser = GetObject("LDAP://" & > rsUsers.Fields("distinguishedName").Value) > objUser.Put "preferredLanguage", "US > English" > objUser.SetInfo > Loop > > For individual editing from the MMC, you would have to make a similar script > and make a small schema modification. Let me know if this is what you > wanted. > > Thanks, > Allan > > > "Claude Lachapelle" <[email protected]> wrote in > message news:D[email protected]... > > Hi! > > > > I need to know where this field is accessible, since I could not find it > > from ADUC? > > > > We need to populate it with user spoken language (Active Directory will be > > used by a support application that will uses this field to determine in > > which > > language we should give support to the user). > > > > Actually, I will automatically populate this field with a VBScript (with > > human resources information), but in the future we will need to maintain > > this > > field when working with users properties. > > > > Thanks. > > > > Claude Lachapelle > > Systems Administrator, MCSE > > > > Thanks. > A

Allan

Guest
Adding a context menu for Preferred Language in ADUC. First, create a script to do your work and put it in a accessible location. -- 'Preferred Language On Error Resume Next Const ADS_PROPERTY_CLEAR = 1 Set wshArgs = WScript.Arguments Set objUser = GetObject(wshArgs(0)) strLang = Inputbox("Please enter the Preferred Language for " & objUser.displayName, "Preferred Language", "US English") If strLang <> "" Then objUser.Put "preferredLanguage", strLang objUser.SetInfo End If -- I usually put the script in \\domain.com\netlogon\AdminUI (you have to create the AdminUI folder) Now open ADSIEdit.msc Go to Configuration -> CN=DisplaySpecifiers -> CN=409 --> Open the Properties for CN=user-Display In attribute, open adminContextMenu and add the following: 5,Preferred Language, \\domain.com\netlogon\AdminUI\PrefLang.vbs Once the data has replicated, the next time you open ADUC and right click a user, you can set preferred language. Thanks, Allan "Claude Lachapelle" <[email protected]> wrote in message news:[email protected]... > Finally I found a VBscript here (http://www.kouti.com/scripts.htm) for > modifying the EmployeeID field which I modified a little bit to have a > list > of languages displayed and selectables, which set the preferredlanguage > attribute. > > But, I read that is possible to programmatically change the way ADUC is > displaying objects, how we could accomplish that? > > Thanks. > > "Allan" wrote: > >> If you are just going to edit a few users, I would use adsiedit.msc. It >> is >> pretty easy to do it from there. >> >> If you want to do a mass edit, you can use a script like the following: >> >> Const ADS_SCOPE_SUBTREE = 2 >> Set objConnection = CreateObject("ADODB.Connection") >> Set objCommand = CreateObject("ADODB.Command") >> objConnection.Provider = "ADsDSOObject" >> objConnection.Open "Active Directory Provider" >> Set objCommand.ActiveConnection = objConnection >> objCommand.CommandText = _ >> "Select distinguishedName from 'LDAP://OU=Us,DC=domain,DC=com' " _ >> & "where objectClass='user' and objectCategory='person'" >> objCommand.Properties("Page Size") = 1000 >> objCommand.Properties("Timeout") = 30 >> objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE >> objCommand.Properties("Cache Results") = False >> >> Set rsUsers = objCommand.Execute >> rsUsers.MoveFirst >> Do Until rsUsers.EOF >> Set objUser = GetObject("LDAP://" & >> rsUsers.Fields("distinguishedName").Value) >> objUser.Put "preferredLanguage", "US >> English" >> objUser.SetInfo >> Loop >> >> For individual editing from the MMC, you would have to make a similar >> script >> and make a small schema modification. Let me know if this is what you >> wanted. >> >> Thanks, >> Allan >> >> >> "Claude Lachapelle" <[email protected]> wrote in >> message news:D[email protected]... >> > Hi! >> > >> > I need to know where this field is accessible, since I could not find >> > it >> > from ADUC? >> > >> > We need to populate it with user spoken language (Active Directory will >> > be >> > used by a support application that will uses this field to determine in >> > which >> > language we should give support to the user). >> > >> > Actually, I will automatically populate this field with a VBScript >> > (with >> > human resources information), but in the future we will need to >> > maintain >> > this >> > field when working with users properties. >> > >> > Thanks. >> > >> > Claude Lachapelle >> > Systems Administrator, MCSE >> > >> > Thanks. >> C

Claude Lachapelle

Guest
How to avoid the "Open File - Security Warning" when clicking on Employee ID in the context menu? I put the .vbs in the netlogon share, using \\domain.com\netlogon\adminui for running the script. This is like MMC is "thinking" that the file is caming from a web site... "Allan" wrote: > Adding a context menu for Preferred Language in ADUC. > > First, create a script to do your work and put it in a accessible location. > -- > > 'Preferred Language > On Error Resume Next > Const ADS_PROPERTY_CLEAR = 1 > Set wshArgs = WScript.Arguments > Set objUser = GetObject(wshArgs(0)) > > strLang = Inputbox("Please enter the Preferred Language for " & > objUser.displayName, "Preferred Language", "US English") > If strLang <> "" Then > objUser.Put "preferredLanguage", strLang > objUser.SetInfo > End If > > -- > I usually put the script in \\domain.com\netlogon\AdminUI (you have to > create the AdminUI folder) > > Now open ADSIEdit.msc > Go to Configuration -> CN=DisplaySpecifiers -> CN=409 --> Open the > Properties for CN=user-Display > In attribute, open adminContextMenu and add the following: > 5,Preferred Language, \\domain.com\netlogon\AdminUI\PrefLang.vbs > > Once the data has replicated, the next time you open ADUC and right click a > user, you can set preferred language. > > Thanks, > Allan > > > "Claude Lachapelle" <[email protected]> wrote in > message news:[email protected]... > > Finally I found a VBscript here (http://www.kouti.com/scripts.htm) for > > modifying the EmployeeID field which I modified a little bit to have a > > list > > of languages displayed and selectables, which set the preferredlanguage > > attribute. > > > > But, I read that is possible to programmatically change the way ADUC is > > displaying objects, how we could accomplish that? > > > > Thanks. > > > > "Allan" wrote: > > > >> If you are just going to edit a few users, I would use adsiedit.msc. It > >> is > >> pretty easy to do it from there. > >> > >> If you want to do a mass edit, you can use a script like the following: > >> > >> Const ADS_SCOPE_SUBTREE = 2 > >> Set objConnection = CreateObject("ADODB.Connection") > >> Set objCommand = CreateObject("ADODB.Command") > >> objConnection.Provider = "ADsDSOObject" > >> objConnection.Open "Active Directory Provider" > >> Set objCommand.ActiveConnection = objConnection > >> objCommand.CommandText = _ > >> "Select distinguishedName from 'LDAP://OU=Us,DC=domain,DC=com' " _ > >> & "where objectClass='user' and objectCategory='person'" > >> objCommand.Properties("Page Size") = 1000 > >> objCommand.Properties("Timeout") = 30 > >> objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE > >> objCommand.Properties("Cache Results") = False > >> > >> Set rsUsers = objCommand.Execute > >> rsUsers.MoveFirst > >> Do Until rsUsers.EOF > >> Set objUser = GetObject("LDAP://" & > >> rsUsers.Fields("distinguishedName").Value) > >> objUser.Put "preferredLanguage", "US > >> English" > >> objUser.SetInfo > >> Loop > >> > >> For individual editing from the MMC, you would have to make a similar > >> script > >> and make a small schema modification. Let me know if this is what you > >> wanted. > >> > >> Thanks, > >> Allan > >> > >> > >> "Claude Lachapelle" <[email protected]> wrote in > >> message news:D[email protected]... > >> > Hi! > >> > > >> > I need to know where this field is accessible, since I could not find > >> > it > >> > from ADUC? > >> > > >> > We need to populate it with user spoken language (Active Directory will > >> > be > >> > used by a support application that will uses this field to determine in > >> > which > >> > language we should give support to the user). > >> > > >> > Actually, I will automatically populate this field with a VBScript > >> > (with > >> > human resources information), but in the future we will need to > >> > maintain > >> > this > >> > field when working with users properties. > >> > > >> > Thanks. > >> > > >> > Claude Lachapelle > >> > Systems Administrator, MCSE > >> > > >> > Thanks. > >> Post reply Insert quotes…
  • Home
  • Forums
  • Tech Support Archives
  • Microsoft
  • Windows Server 2003
Back Top

Tag » Active Directory User Attributes Language