PowerShell Toolmaking Fundamentals

Are you a beginning to intermediate PowerShell scripter and tired of writing one-off scripts? Take your scripting to the next level and begin to think of your scripts as tools.
Course info
Rating
(138)
Level
Intermediate
Updated
May 23, 2015
Duration
3h 55m
Table of contents
Description
Course info
Rating
(138)
Level
Intermediate
Updated
May 23, 2015
Duration
3h 55m
Description

PowerShell can be many things to many different people. PowerShell can be a simple command-line replacement or a scripting language. Beginners to intermediate-level scripters are probably still writing one-liners and simple scripts. They're probably starting to see the potential of PowerShell not as a simple scripting language but as a way to build "tools" to use over and over again. Don't recreate the wheel. Learn how to create reusable scripts so you don't have to recreate that wheel.

About the author
About the author

Adam Bertram is an independent consultant, technical writer, trainer, and presenter. Adam specializes in consulting and evangelizing all things IT automation, mainly focused around Windows PowerShell.

More from the author
Infrastructure Testing with Pester
Intermediate
2h 52m
Jan 5, 2017
More courses by Adam Bertram
Section Introduction Transcripts
Section Introduction Transcripts

Tool #1: Active Directory Account Management Automator
Hello, this is Adam Bertram, and this is module three of my PowerShell Toolmaking Fundamentals course. In this module, we get started building our first tool, the Active Directory Account Management Automator tool. This module will go over creating and managing Active Directory accounts. This tool will consist of using the Active Directory PowerShell module to create a typical Active Directory user account for an employee at our company, as well as their computer account. This tool will have the ability to not only create user and computer accounts, but also add the user to groups and reset user passwords. The purpose of this tool is to create a script that is reusable. New employees are always being hired at our companies. If not, you should probably be worried. So it's a task that's repeatable. Doing all of this in Active Directory users and computers is a pain and is open to a lot of fat-fingering. We'll be creating a very useful tool here to use as our main Active Directory account management solution.

Tool #2: Log Investigator
Hi! I'm Adam Bertram, and this is module 4 of my PowerShell Toolmaking Fundamentals course. In this module, we'll be covering our second tool called the log investigator. by the end of this module, you should have a very useful tool to gather logs from various sources and easily readable format. One of the many hats an IT pro wears is troubleshooting. A server goes down in the middle of the day. Why? An application crashed last night. How come? Many times, tracking down the cause of these problems lies in a log file somewhere, but where at? Sometimes you don't really know where to start looking. This is what the log investigator tool will help with. This tool is being created to assist me in tracking down root causes of various problems on Windows servers. Its purpose is to search through every piece of interesting logging data on a system within a specific timeframe and give me a glimpse as to the state of the system at a certain time. When diving into a long troubleshooting session, this tool will get me started. There're not many prereqs in this module. The log investigator tool can be any Windows machine that can get PowerShell v4 installed. This is the only real requirement here. However, to follow along in the demos and get the same experience I am, you'll also need another remote machine that you have administrator control over.

Tool #3: File and Folder Management Automator
Hi! This is Adam Bertram, and this is module 5 of my PowerShell Toolmaking Fundamentals course. In this module, I'll be building the third and final tool in this course called the file and folder management automator tool. A common task among IT pros is managing files and folders. I intend for this tool to be a one-stop shop for all my files as to management needs and be built in a way that allows me to add on existing functionality. The file and folder automator tool I'll be creating in this module is going to concentrate on three areas: Finding files and folders, setting ACLs, and, finally, creating a robust archiving solution that will allow me to archive old files and folders in user home folders.

Debugging Techniques
Hello! This is Adam Bertram, and this is module 6 of my PowerShell Toolmaking Fundamentals course, Debugging Techniques. In this module, we won't necessarily be creating tools like we have in the last few. The more you write your own tools, the more code is created. Thus, the more opportunities for your scripts to break. You'll find that scripts can break in any number of ways, and debugging skills are critical in figuring out what went wrong. In this module, we'll go from a situation that's easiest to debug all the way to a hard one. By the end of this module, you should have the troubleshooting skills to track down lots of common problems.