nerdexam
CompTIA

SK0-005 · Question #115

Which of the following will correctly map a script to a home directory for a user based on username?

The correct answer is B. \\server\%username%. In Windows environments, %username% is an environment variable that dynamically resolves to the currently logged-in user's account name at login time. Using \\server\%username% (B) in a logon script or Group Policy drive mapping will substitute the actual username, pointing…

Server administration

Question

Which of the following will correctly map a script to a home directory for a user based on username?

Options

  • A\server\users$\username
  • B\server%username%
  • C\server\FirstInitialLastName
  • D\server$username$

How the community answered

(36 responses)
  • A
    3% (1)
  • B
    92% (33)
  • C
    6% (2)

Explanation

In Windows environments, %username% is an environment variable that dynamically resolves to the currently logged-in user's account name at login time. Using \server%username% (B) in a logon script or Group Policy drive mapping will substitute the actual username, pointing each user to their individual home folder automatically. Option A (\server\users$\username) uses the literal string 'username' rather than a variable - every user would be mapped to the same folder named 'username'. Option C uses a hardcoded naming convention that does not adapt per user. Option D uses $username$ which is not valid Windows environment variable syntax; dollar signs delimit variables in Unix/Linux shells, not in Windows batch/script environments.

Topics

#Home Directory Mapping#User Management#Environment Variables#Network Shares

Community Discussion

No community discussion yet for this question.

Full SK0-005 Practice