Bill Stewart


Bill Stewart is a scripting guru who works with the Enterprise Technology Services group at Indian Health Service in Albuquerque, New Mexico. He has written numerous articles about Windows scripting and is a moderator for Microsoft's Official Scripting Guys Forum. He has also written some useful free tools for the Windows IT community, which are available from his website at

PowerShell: Granting Computer Join Permissions
The principle of least privilege, as applied to Active Directory (AD), means that users should be granted only the minimum permissions necessary to complete their job functions. Here's how you can work towards that a little more easily with PowerShell.
Working with IPv4 Addresses in PowerShell

System administrators work with IP version 4 (IPv4) addresses on a regular basis. If you’ve ever had to work with IPv4 addresses in scripts, you’re already aware of the complications: IPv4 addresses are 32-bit numbers, not strings. In order to calculate a network ID, for example, you need to use the bitwise AND operator with the IPv4 address and a subnet mask.

PowerShell - Farewell to For

In my last article (Goodbye, Goto), I described how batch files handle common iteration (repeating or looping) and subroutines using the Goto and Call commands, and the most common PowerShell language constructs that replace those commands. Batch files have one last iteration command command that you still need to know how to replace in PowerShell: The For command.

PowerShell: Goodbye, Goto
When batch files were added to MS-DOS over 30 years ago, the BASIC programming language was the predominant programming language in use on microcomputers, and GOTO ruled to roost. Fortunately, things have improved. Here's how while, do while, do until, and for replace those classic commands in a variety of situations.
Changing Service Credentials Using PowerShell 3
Changing an account’s password is simple, but updating the password for all of the services that start using that account can be a time-consuming and error-prone process, depending on the number of servers and services involved.
PowerShell: Why You'll Never Go Back to Cmd.exe Batch Files
Scripts have a long history on the Windows OS platform. In Cmd.exe most people call them batch files, but they are scripts nonetheless. The command-line parsing rules that Cmd.exe uses mean that some commands you enter on a Cmd.exe command line behave differently than when you put the same commands in a batch file. This is an ongoing source of confusion for those not familiar with Cmd.exe’s syntax quirks.
Presenting the PowerShell Pipeline
Little makes sense in PowerShell without an understanding of the pipeline.
PowerShell: Objects and Output
Now that you’ve started using PowerShell as an interactive command line, you’ll need to understand that there are some fundamental differences between how Cmd.exe and PowerShell process input and output.
Using PowerShell Interactively
While PowerShell is Powerful a scripting language, it’s also an interactive command shell that you can use instead of Cmd.exe.
Batch to PowerShell - Syntax Differences
In my last article, I made the argument that you should stop writing batch files (Cmd.exe shell scripts) and instead focus your efforts on learning PowerShell. In this article, I’ll describe the special characters that Cmd.exe uses and how a number of these characters work differently in PowerShell.
Break Your Batch Habit and Move to PowerShell 15
Windows PowerShell should rightly be seen as a replacement for batch file scripting (Cmd.exe shell scripting), but for some reason, many people seem to be unwilling to leave batch behind. This article begins a series that’s designed to help you break the batch habit and move forward with PowerShell.
Take Charge of Environment Variables in PowerShell 1
Windows PowerShell has some limitations when it comes to working with environment variables. Here are three functions you can use to overcome these limitations.
Securely resetting the Administrator account password for a computer
Resetting the Local Administrator Password on Computers 25
Resetting an Administrator account password with a Group Policy Object isn't secure. Here's how to securely reset the Administrator account password.
Enforcing Administrators group membership
Enforcing the Membership of the Administrators Group
Here's a solution for managing the members of the Administrators group on computers when you don't have an Active Directory domain or you can't use Group Policy.
Pointing out common pitfalls when running executables in PowerShell
Running Executables in PowerShell 2
Correctly constructing an executable's command line in PowerShell can be confusing. The guidelines presented here can help you avoid common pitfalls.

Join the Conversation

Sponsored Introduction Continue on to (or wait seconds) ×