On CBSSports.com: Play FREE College Fantasy Football

SolutionBase: Supercharge the command line with Windows PowerShell 1.0

Tags: Operating systems, Microsoft Windows Vista (Longhorn), Luke Swagger, Microsoft Windows PowerShell, Microsoft Windows

  • Save
  • Print
  • 23

Takeaway: The DOS prompt has been around for a long time. Microsoft has finally gotten around to updating it for the 21st century. Here's what you'll find in the Windows PowerShell.

This article is also available as a TechRepublic download.

Windows started out as being a graphical interface to run over top of the old DOS operating system. Over time, Windows evolved into its own operating system, but ever since the 80's, there's always been a DOS-like command prompt available to network administrators. The problem is that the command prompt itself has remained largely unchanged in 25 years. Microsoft has recently changed that by releasing the PowerShell. In this article, we'll take a look at it.

What's the PowerShell?

PowerShell is a new tool Microsoft created to help network administrators and tech support people do things more efficiently. It was formerly known by its code name 'Monad'.

Most Windows administrators know that using the command prompt to do some tasks is much easier than pointing and clicking through the Windows GUI and MMCs to do the same thing. The PowerShell is actually more than just a simple command prompt. It combines the flexibility of a command-line interface with a powerful scripting language. Until Microsoft released PowerShell, the closest you could come would be by combining the Windows command prompt with VBscript files.

The PowerShell includes a command set of over 125 commands that help automate many tasks. It's also expandable. Third parties have created things called cmdlets which extend the already vast power of Powershell. Some of the PowerShell partners include:

Microsoft only supports 'modern' operating systems with PowerShell. If you're still running Windows 9x or Windows 2k, you're out of luck. You also need to be sure you've applied the latest support packs for your operating system. Supported operating systems include:

  • Windows XP SP2
  • Windows Vista
  • Windows Server 2003 SP1
  • Windows Server 2003 R2
  • Windows Longhorn Server

PowerShell works equally well on 32 bit and 64 bit versions of Windows. You just have to be careful to make sure that you download the proper version for the CPU your machine is running.

The PowerShell was initially supposed to have shipped as part of Windows Vista and Longhorn. However, it's not included with either version. You must download and install it separately. By the time Longhorn ships, it may be included, but right now it's not.

Obtaining and installing PowerShell

You can obtain PowerShell directly from the Microsoft PowerShell Download page. On this page, you'll scroll down to the operating system and CPU version of PowerShell that you need and click the appropriate link.

Author's Note:

As of the time of this article, there was no final version of the Vista version of PowerShell. Microsoft plans to release a final version for Vista by January 31, 2007. Microsoft claims that the RC2 version should be fine for testing until then.

Once you've selected the proper OS and CPU, the download is pretty simple. Just save the appropriate EXE file to a temporary location on your machine. The file size will vary depending on the version you're downloading, but the files aren't that long. The Windows XP version for example is only 1.6Mb. On a fast connection, you should have them in a matter of minutes.

Before you can install PowerShell, you need to have .NET Framework 2.0 installed on your machine. You can obtain this through Windows Update or from Microsoft's Web site. This file is a little over 22Mb, so it might take a little time to download and install.

Installing PowerShell itself is a snap. Just run the PowerShell file you downloaded. The interface is a little different from normal Windows wizards. It more closely resembles the installer for Service Pack 2, but there are no gotchas to worry about during the installation. Just let it run.

Running PowerShell

When the installation is done, you're ready to use PowerShell. You can start it two ways. Click Start | All Programs | Windows PowerShell 1.0 | Windows PowerShell. You can also click Start | Run and type powershell in the run dialog box, followed by [Enter].

When you do what looks a regular command prompt appears on the screen. The only immediate difference you'll notice is that the window will be entitled Windows PowerShell. Other than that you'll see a standard C:\> prompt.

You can try running basic DOS commands in the window, but don't be surprised if they don't work or when they do, the output looks different. For example, DIR to get a directory looks completely different and DIR /W fails with an error.

More to come

If you just nose around inside of the PowerShell, you'll see that there's lots more to learn--more than can be covered in one article. We'll cover more about PowerShell in other articles.

  • Save
  • Print
  • 23

What do you think?

Article Categories

Security
Security Solutions, IT Locksmith
Networking and Communications
E-mail Administration NetNote, Cisco Routers and Switches
CIO and IT Management
Project Management, CIO Issues, Strategies that Scale
Desktops, Laptops & OS
Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
Data Management
Oracle, SQL Server
Servers
Windows NT, Linux NetNote, Windows Server 2003
Career Development
Geek Trivia
Software/Web Development
Web Development Zone, Visual Basic, .NET

Ultraportables

advertisement
Click Here