Before PowerShell: MS-DOS, VBScript, WMIC

I. Introduction

Before PowerShell was available on Windows, what languages could system administrators use for operating system and service administration? In this chapter, we'll look at PowerShell's predecessors: MS-DOS and VBScript.

II. Discovering MS-DOS

MS-DOS, which stands for Microsoft Disk Operating System, and is also known as DOS, is above all a command-line operating system developed by Microsoft and used from the early 1980s to the mid-1990s. This operating system was developed for the first IBM PC compatible computers.

In practice, MS-DOS takes the form of a command-line-only operating system. MS-DOS is based on a command-line user interface (CLI).

As you can see, it's very different from the Windows system as we know it today, and it may seem rudimentary. In fact, the first operating system to incorporate a graphical interface was Windows 1.0.

Even today, however, MS-DOS is still present in Microsoft operating systems, whether Windows 10, Windows 11 or Windows Server 2022, via the Command Prompt.

For your information, here is a list of useful and popular DOS commands:

  • dir: display the contents of a directory.
  • cd: change current directory.
  • cls: deletes the contents of the command prompt visible on the screen.
  • copy: copy files from a source location to a destination location.
  • del: delete one or more files.
  • move: move files from one location to another.
  • rename a file, specifying its current and new names.
  • net use: connect a network drive (remote share associated with a drive letter).
  • netsh: manage the machine's network configuration
  • reg: manipulating the Windows Registry

Although PowerShell is available and can replace all these commands, some are still used by system administrators, whether for routine administration or within scripts.

III. Discovering VBScript

VBScript, which stands for Visual Basic Scripting Edition, is a scripting language developed by Microsoft. VBScript scripts are executed on Windows through the Windows Script Host (WSH). Although it can be used to automate a wide variety of tasks, VBScript has been widely used via Internet Information Services(IIS) web servers, and has been integrated into the Internet Explorer browser, which has been obsolete for several years.

Like DOS commands, and despite the presence of PowerShell, VBScript is still available on the most recent versions of Windows. However, with the advent of newer, more powerful technologies such as PowerShell for task automation on Windows systems, and JavaScript for client-side script execution, the use of VBScript has declined.

This trend is confirmed by Microsoft's declaration in October 2023 that VBScript is obsolete and should be removed from future versions of Windows. Microsoft's decision is also aimed at removing a scripting language exploited by various malware.

A VBScript script takes the form of a file with the extension ".vbs". The script below displays a dialog box with the message "Hello World!" on the screen.

MsgBox "Hello World !"
VBScript language before PowerShell

In the next chapter, we'll look at the Monad project that gave rise to PowerShell, and the arrival of PowerShell itself.