PrepAway - Latest Free Exam Questions & Answers

Which command should you run on the Web server?

You install the Web Server (IIS) role on a server that runs Windows Server 2008. Your companys
human resources department has a Web site named www.contoso.com/hr. You need to create a
virtual directory on the company Web site for the HR department. Which command should you run
on the Web server?

PrepAway - Latest Free Exam Questions & Answers

A.
appcmd add app /app.name:contoso /path:/hr/physicalPath:c:\websites\hr

B.
appcmd add site/name:hr/physicalPath:c:\websites\hr

C.
appcmd add vdir/app.name:contoso /path:/hr/physicalPath:c:\websites\hr

D.
appcmd set vdir/vdir.name:hr/path:/hr /physicalPath:c:\websites\hr

Explanation:
The syntax to add a virtual directory to the root application in a site is:
appcmd add vdir /app.name:string/ /path:string /physicalPath:string The variable app.namestring is
the site name and the / following the name specifies that the virtual directory should be added to
the root application of the site. The variable pathstring is the virtual path of the virtual directory,
such as /sl, and physicalPathstring is the physical path of the virtual directory’s content in the file
system. For example, to add a virtual directory named sl with a physical location of c:\websites to
the root application in a site named contoso, you need to type the following command prompt
appcmd add vdir /app.name: contoso / path:/sl /physicalPath:c:\websites\sl Reference: IIS 7.0:
Create a Virtual Directory
http://technet2.microsoft.com/windowsserver2008/en/library/87d8a3d7-8d90-4626-8f85-
3c782ec9a5331033.mspx?mfr=true


Leave a Reply