systemhalted by Palak Mathur

Unix-like Command Line Experience in Windows - PowerShell

Share on:

Recently, I was going through some course on Internet when I came across PowerShell. We used to work with a program called cmd.exe, but always wanted to have the usability and power that Unix command line offers. If you are using Windows 7 or later, then you just need to follow following steps:-

  • Click Start.
  • In “Search programs and files”, type: powershell and press Enter.

This will open a cmd.exe like window.

If you are still working on Windows XP, like me, then you can download the PowerShell from here.

You can try the following commands on powershell:

  • pwd
    print working directory
  • hostname
    computer’s network name
  • mkdir
    make directory
  • cd
    change directory
  • ls
    list directory
  • rmdir
    remove directory
  • pushd
    push directory
  • popd
    pop directory
  • cp
    copy a file or directory
  • robocopy
    robust copy
  • mv
    move a file or directory
  • more
    page through a file
  • type
    print the whole file
  • forfiles
    run a command on lots of files
  • dir -r
    find files
  • select-string
    find things inside files
  • help
    read a manual page
  • helpctr
    find what man page is appropriate
  • echo
    print some arguments
  • set
    export/set a new environment variable
  • exit
    exit the shell
  • runas
    DANGER! become super user root DANGER!
  • attrib
    change permission modifiers
  • iCACLS
    change ownership

I am still trying to learn these commands. Will come up with details when I know about each of them. There are few that you already know. So, let us get started.

Enjoy Powershell!!

System Administration