none
70-640 Configuring 2008 AD - $username$ or %username% RRS feed

  • Question

  • I've already got a bookmark to this book's errata page on support.microsoft.com, but I am thoroughly confused as the book is wrong (per the erratta) in so many places, but I don't know if it's also right in some instances or the errata needs to be updated.

    Chapter 3 Lesson 1 says to use %%, but the errata says this is an error, use $$
    dsadd user "cn=Mike Fitzmaurice,ou=People,dc=contoso,dc=com" -samid mike.fitz -pwd * -mustchpwd yes -hmdir \\server01\users\%username%\documents -hmdrv U:

    Ok fine. Then within the next few pages, on the practice "Automating the Creation of User Accounts", step 17 we're back to using %username%. The very next page uses %username% as well for the dsadd.

    Now, I understand that from the command line there are special environment variables to get to things like %commonprogramfiles% and %windir%, but what I don't understand is when do I use $username$ as opposed to %username% ?

    Thanks

    ** EDIT: If I have this in the wrong forum, can a MOD please move it to the correct one so I can get answers and move forward? Thanks

    Tuesday, August 17, 2010 5:13 PM

Answers

  • Hello, I have been using Active Directory since Windows 2000 and have not come across the use of $username$ before but use the string %username% regulary.

    It may be best to have a look at the TechNet AD-DS documentation here: http://technet.microsoft.com/en-us/library/dd378891%28WS.10%29.aspx

    I sat this exam about 2 years ago and do not recall studying anything around the use of $username$.

     

    The only time I use anything similar in a Windows environment is for hidden paths and this is seen as 'pathname$' without a $ in the front.

    This is a good article that should help you gain a better understanding of the use of these symbols, http://support.microsoft.com/kb/909264

     

    If anyone else here knows how this $$ function is used then I will be keen to know anything about this.

     


    Jarad, MCITP, Brisbane Australia
    Wednesday, August 18, 2010 3:01 AM

All replies

  • Hello, I have been using Active Directory since Windows 2000 and have not come across the use of $username$ before but use the string %username% regulary.

    It may be best to have a look at the TechNet AD-DS documentation here: http://technet.microsoft.com/en-us/library/dd378891%28WS.10%29.aspx

    I sat this exam about 2 years ago and do not recall studying anything around the use of $username$.

     

    The only time I use anything similar in a Windows environment is for hidden paths and this is seen as 'pathname$' without a $ in the front.

    This is a good article that should help you gain a better understanding of the use of these symbols, http://support.microsoft.com/kb/909264

     

    If anyone else here knows how this $$ function is used then I will be keen to know anything about this.

     


    Jarad, MCITP, Brisbane Australia
    Wednesday, August 18, 2010 3:01 AM
  • dsadd user "cn=Mike Fitzmaurice,ou=People,dc=contoso,dc=com" -samid mike.fitz -pwd * -mustchpwd yes -hmdir \\server01\users\%username% \documents -hmdrv U:

    I have just tested this on an unused Server 2008 R2 DC at home and in the 'dsadd' the %username% string work and the $username$ string hangs the system.

    I would strongly recommend that %xyz% is correct based on my past experience.


    Jarad, MCITP, Brisbane Australia
    Wednesday, August 18, 2010 3:51 AM
  • According to the eratta page, http://support.microsoft.com/kb/955243 if you look at the correction for Page 94 and 122:

    "On page 94, in the command under Step 2 an incorrect token is used" and it says that %username% should be changed to $username$

    Wednesday, August 18, 2010 5:44 AM
  • I just looked at that, I will be very interested to know the nature/use of the $$ instead of the %%.

    I have just googled it but cannot find information on this.

     

    I will be keen to hear from anyone that is familiar with the use of $$ as well.


    Jarad, MCITP, Brisbane Australia
    Wednesday, August 18, 2010 5:51 AM