Exploring Commands: Step-by-Step Exercises

In this exercise, we explore the use of command-line utilities in Windows PowerShell. You will see that it is as easy to use command-line utilities in the Windows PowerShell as in the CMD interpreter; however, by using such commands in the Windows PowerShell, you gain access to new levels of functionality.

  1. Start Windows PowerShell by using Start | Run | Windows PowerShell. The PowerShell prompt will open by default at the root of your Documents And Settings.

  2. Change to the C:\ root directory by typing cd C:\ inside the PowerShell prompt:

    Cd c:\
  3. Obtain a listing of all the files in the C:\ root directory by using the dir command:

    dir
  4. Create a directory off the C:\ root directory by using the md command:

    Md mytest ...

Get Microsoft® Windows PowerShell™ Step By Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.