Share via


Gary's $this and that about PowerShell

I am a Microsoft Senior Premier Field Engineer based out of Atlanta, GA. My focus is Powershell. This blog is mainly to share interesting Powershell script samples.

Test Post to See if Code Paste From ISE Looks Okay

This just a test post to see how well I can get code from ISE to look good on the blog, almost like...

Date: 07/01/2014

Fun Script to Never Run While in a Hospital

In class today a student asked about having a little fun and simulating a flat line heartbeat...

Date: 04/09/2014

Profile Script From my Workshop VMs

I had a student today ask for a copy of the profile I showed during class where I set error...

Date: 04/08/2014

Sample all PowerShell Console Colors

I often need to pick console colors to use making host text a little easier to look at (coupled with...

Date: 11/20/2013

PowerShell and Kinect for Windows

I put together a script that will allow you to render skeleton joints right in your PowerShell...

Date: 06/20/2013

Is this just wrong? Double Where-Object to use the simplified syntax with –and.

When PowerShell v3 introduced the new simplified syntax for the where-object, at first I really...

Date: 05/01/2013

Upcoming Atlanta-Area PowerShell Event

Hey folks, I am like the Dos Equis guy. I don't post often, but when I do, its about cool stuff :)...

Date: 10/17/2012

I will be delivering a Technical Training Session at the Feb. Meeting of AAUG (Atlanta Active Directory User Group)

Hey folks.  I will be delivering a session the MS AD module for PowerShell at the February...

Date: 01/25/2012

I don’t love doing the whole self promotion thing, but every so often I am proud of something enough...

Date: 01/25/2012

Video Showcasing Microsoft Certified Master Certification and Training Program

I went through the MCM program for Exchange 2007 a few years ago.  It was an absolutely great...

Date: 04/22/2011

2011 Scripting Games

Coming up next week is the 2011 Scripting Games.  The last two years I have participated as a...

Date: 03/31/2011

Premier Technology Day – Messaging – Coming to Alpharetta, GA Microsoft Office May 24,2010

Alright, so I am being a little bit of a sales guy here, but yours truly is presenting the transport...

Date: 05/05/2010

2010 Scripting Games Coming Soon

Those of you that read my blog, mostly do so as you are trying to become better...

Date: 03/25/2010

The Get-MailboxStatistics Cmdlet, the TotalitemSize Property, and that pesky little “b”

In my experiences with Exchange and Powershell, I have definitely come across some interesting...

Date: 02/19/2010

Quick Script to Edit a Single Attribute in AD on a Single User Account

There are no real dependencies for this script, PSv1 or v2, no snap-ins, no modules….just plain old...

Date: 02/02/2010

Demo of PowerShell Pipeline Behavior – Asynchronous vs. Synchronous

When I teach PowerShell classes I sometimes get into a discussion on the more advanced topic (at...

Date: 01/28/2010

Using Microsoft's New AD PowerShell Cmdlets

In the past two weeks I have really started playing with the new AD PowerShell cmdlets from...

Date: 11/12/2009

Mailbox Database Statistics

UPDATED: Minor Script Modifications made, detailed help comments added mainly for PSv2 and units...

Date: 11/11/2009

Example for Identifying Domain Controller Subnet Membership with PowerShell

First of all let me thank Rich Doyle (a fellow PFE) for allowing me to post this script.  Rich...

Date: 09/23/2009

Counting Public Folder SubFolders

This sample script was written by a brilliant fellow PFE named Chris Schrimsher.  Chris gave me...

Date: 09/23/2009

List Mailbox Sizes for both Exchange 2003 and Exchange 2007

This is a script I put together because…well I don't remember what prompted me to write it. ...

Date: 09/16/2009

Resolve IP Addresses to Hostname using PowerShell

I had a previous customer shoot me an email asking for help whipping up a script to convert a list...

Date: 08/28/2009

So many ways to take care of that poor old cat – Getting a list of just directories in PowerShell

Such a simple concept…how can we just retrieve a listing of folders instead of files and...

Date: 08/20/2009

Find Expiring Certificates Using PowerShell – One-Liner and a Script

This code is not really complicated at all.  Just the same it can come in very handy, and some...

Date: 08/12/2009

Get Exchange Mailbox Database Size – One-Liner – Version 2

In my previous post (Some Handy Exchange Mailbox and Database Size Powershell One-Liners), I...

Date: 08/10/2009

Lesson Learned Today about PowerShell’s .Net Type System

Today I was asked why this person saw more properties showing with a “format-table”, than with a...

Date: 08/05/2009

Create Calendar Appointments Automatically Based on Existing Calendar Appointments - For my Fellow PFE Co-Workers (The Concepts are for Anyone)

Like my other PowerShell blog posts, this is a sample of what a script can do.  This post is...

Date: 08/02/2009

One-Liner to List Calendar Appointments with a Simple Filter

So this post is born out of my playing with writing a script to help me be a better PFE.  I...

Date: 08/01/2009

Simple Random Number Demonstration Script

I was delivering my session today at the Alpharetta (Atlanta) PFE Technology Day, and needed to come...

Date: 07/31/2009

Simple but Handy Functions – Part 1 (The Functions Themselves, Detail About Them Coming Soon)

I thought I would share a few simple functions that I find handy.  They are nowhere near rocket...

Date: 07/31/2009

Sample for Sending Email with PowerShell

I get asked quite often to show examples of sending an email from Powershell.  This could...

Date: 07/27/2009

First Alpharetta PFE Technology Day

I am really excited.  Next Friday we have our first PFE Technology day in our Alpharetta, GA...

Date: 07/24/2009

Simple Text Parse with Powershell using IPConfig.exe

Here is a fun little one-liner in Powershell: PS C:> ipconfig | where-object {$_ -match...

Date: 07/24/2009

Do Your Own Thing - Creating a New Object from Scratch in Powershell V1 to Populate and have your Script Output a nice Object Instead of just Strings

I use PSObject all the time.  Now when I write scripts I nearly always output an object and...

Date: 07/23/2009

Some Handy Exchange Mailbox and Database Size Powershell One-Liners

I wrote this up a while ago to share with customers and colleagues, but I never really posted it...

Date: 07/23/2009

Quick AD Search Example

I was emailing with another instructor tonight and wrote a quick snippet to search AD for an object...

Date: 07/23/2009

Using Add-Member in a Powershell One-Liner to Create Calculated Properties

This is one of the live demos I do when I teach class.  Its a slightly advanced concept for...

Date: 07/23/2009

Creating a PS Credential from a Clear Text Password in Powershell

Before I begin here, let me say, this is very unsecure.  There are very few times when doing...

Date: 07/23/2009

Wow, another blog...who needs it?

I know, I know.  Its yet another blog to hit the WWW.  I do have some specific reasons for...

Date: 07/23/2009