Friday, June 28, 2013

The Lync 2013 Daily is out

Free Microsoft eBooks

For a limited time you can download a large selection of free Microsoft eBooks here

Check Active Directory Schema Version for Windows Server 2012

In line Windows Server 2012 new Schema Version came, Active Directory Forest Schema Version is 56 for Windows Server 2012. Once Active Directory Forest schema is extended by using ADPrep /ForestPrep command, a preliminary check must be performed to make schema has been extended.
Please follow the steps to check the value of objectVersion attribute:
  1. Run LDP.exe, go to Connection and then click on Bind.
  2. Click Ok. Next click on View, Tree and then select the following LDAP path from the dropdown list: CN=Schema,CN=Configuration,DC=,DC=
  3. Click Ok to run the LDP query against the above LDAP Path.
In Right Pane, check objectVersion: 56 attribute. If it is 56 Admin ADPrep command successfully extended the schema.

How To Use DsQuery

In Active Directory there are ample numbers of the command line tools/utility which we can used to relate with Active Directory, such as DsMOD, DsQuery, DsGet, NetDom etc….

Now I’m using DsQuery command 

Dsquery is a command-line tool that is built into Windows Server 2008. It is available if you have the Active Directory Domain Services (AD DS) server role installed. To use dsquery, you must run the dsquery command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

Which can query for any type of object:

dsquery computer – finds computers in the directory.
dsquery contact – finds contacts in the directory.
dsquery subnet – finds subnets in the directory.
dsquery group – finds groups in the directory.
dsquery ou – finds organizational units in the directory.
dsquery site – finds sites in the directory.
dsquery server – finds AD DCs/LDS instances in the directory.
dsquery user – finds users in the directory.
dsquery quota – finds quota specifications in the directory.
dsquery partition – finds partitions in the directory.

To find all the domain controllers in the forest with DN and RDN:
  • DsQuery Server -o RDN -Forest
  • DsQuery Server -Forest
To find all the domain controllers in a domain:
  • DsQuery Server -domain
To list all the domain controllers in a domain that is also Global Catalog Servers:
  • DsQuery Server -domain -isgc
To list the domain controller in the forest that holds the Schema FSMO:
  • DsQuery Server -Forest -hasfsmo schema
Use the ">" to store the output to a text file. The below command will store all the domain controller names in AllDCs.txt.
  • DsQuery Server -Forest > AllDCs.txt

Retrieve a List of Groups

Dsquery group DN

For example, the following command retrieves a list of all groups in the Sales OU 

C:\>dsquery group "ou=sales,dc=dinesh,dc=singh,dc=com" 
"CN=G_NorthSalesAdmins, OU=South,OU=Sales,DC=dinesh,DC=singh,DC=com"

C:\>dsquery group "ou=sales,dc=dinesh,dc=singh,dc=com" > group.txt

 Please share your valuable feedback for improvement :)

Update Assistant Name Field in Outlook Global Address List

Sometime users asking they are Unable to update Assistance Name Filed in GAL for Exchange 2003/2010 Users


Due to misconfiguration update users not able to see his/her assistance.

Solution: -

There are two way to resolve this issue, one is through Exchange Management Shell and other is well known ADSIEDIT tool in Active Directory

  If users are belongs to Exchange Server 2010 below CMDlet will work

Set-User –Identity “User Name” – AssistantName “Assistant Name” –TelephoneAssistant “Phone Number”

Once you update you can verify with below Cmdlet

Get-User –Identity “User Name” |fl *assis*

Using my favored tool for updating Assistant Name through

If you see above result Assistance name is not updated in this case you need to user ADSIEDIT tool in Active Directory (all changes happening on Active Directory Database “NTDS.DIT”)

(Please be carefull while you are running ADSIEDIT tool)

  1. 1.   Click on Run
    2.   Type “Adsiedit.msc”
    3.   Select “Default Naming Context”
    4.   Navigate to “users OU”
    5.   Right Click “User Name”
    6.   Find “msExchangeAssistantName” attribute
    7.   Update the Assistant name
    8.   Exit from Adsiedit.

    Thank you.

    Please leave valuable comments.