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

Resetting Local Account Passwords 2
This article presents a new script, Reset-LocalAccountPassword.ps1, which makes it easier and more secure to reset local account passwords on computers.
Get BitLocker Recovery Information from AD Using PowerShell

Many organizations are taking advantage of Microsoft’s BitLocker drive encryption software that is built into Windows Vista, Windows Server 2008, and later versions of Windows. To ensure that encrypted drives are accessible to authorized members of organizations, Microsoft has provided the ability to back up BitLocker recovery information to Active Directory (AD). For more information about the details, see Backing Up BitLocker and TPM Recovery Information to AD DS in the TechNet documentation.

Getting Computer Uptime Using PowerShell 5

Computer uptime is an important statistic in systems management. Here are several of the ways we can determine system uptime for a computer (note that this list is by no means exhaustive):

1. The Task Manager’s Performance tab displays the computer uptime as days, hours, minutes and seconds.

2. The Systeminfo command-line tool displays the computer’s last boot time.

3. The most recent event ID 6005 in the computer’s System event log records the computer’s last boot time.

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 1
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 16
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.
Microsoft Stack Master Class

Master-Level Microsoft Stack Class with John Savill
Online Class: Thursdays Oct. 12th-Dec. 21st
30 Hours of Training for $995!

Understand the complete Microsoft solution stack, how the products work together, and how to implement and maintain for a total datacenter and desktop solution. This course covers the latest technology updates including Windows Server 2016 and Windows 10 and will enable the new capabilities to be leveraged in your organization.


Join the Conversation

Sponsored Introduction Continue on to (or wait seconds) ×