What are the values ​​for the country field in Active Directory?

I have a feeling that Windows expects the "country" to be an integer, and 0 means "USA." If this is the case, then what is the mapping between integers and country codes with the letter ISO 2? Active

+3
source share
3 answers

See this link here:

ISO 3166 Country Codes

These seem to be standard ISO 3166 country codes used in several places.

The same result from this post here: Active Directory and .NET

Point 5 reads:

5. Set user country

, . , ISO 3166 : c, co COUNTRYCODE.

, ISO 3166 , - ! ( - ....)

+7

, countryCode c, ISO 3166. - , - (ISO 3166 A2).

. ISO 3166.

, co, .

+6

Active Directory . ISO 3166. - ISO , . "", " ..." .

  • c — 2- (, US)

    / . / ​​ 2- ISO-3166.

  • co — (, ). Microsoft .

    /, .

  • countryCode — (, 840)

    Indicates the country / region code for the selected user language. This value is not used by Windows 2000.

    Note. If you want to clear the country field, you need to set this value to 0. You cannot set it to nullor String.Empty. It will throw out DirectoryServicesCOMException, indicating "The server does not want to process the request" when you call CommitChanges(), if you try to install it on anything other than int.

    DirectoryEntry.Properties["countryCode"].Value = 0;
    
+5
source

Source: https://habr.com/ru/post/1789601/


All Articles