Sign in
TechNet Blogs
Technet Blog Images
More ...
Common Tasks
Blog Home
Email Blog Author
About
RSS for posts
RSS for comments
Search
Tags
.net
AD
Add-Member
Custom
database
Database Size
DC
decimal
default view
directorysearcher
email
Event
Exchange
exchange 2000
exchange 2003
exchange 2007
expire
expiring
folders
formatting
Mailbox Size
one-liner
outlook.application
Powershell
wmi
Archives
Archives
May 2013
(1)
October 2012
(1)
January 2012
(2)
April 2011
(1)
March 2011
(1)
May 2010
(1)
March 2010
(1)
February 2010
(2)
January 2010
(1)
November 2009
(2)
September 2009
(3)
August 2009
(7)
July 2009
(11)
Browse by Tags
TechNet Blogs
>
Gary's $this and that about PowerShell and Exchange
>
All Tags
>
powershell
Tagged Content List
Blog Post:
Upcoming Atlanta-Area PowerShell Event
Gary Siepser
Hey folks, I am like the Dos Equis guy. I don't post often, but when I do, its about cool stuff :) Yours truly is going to be delivering two sessions at the upcoming PowerShell Saturday event at the Microsoft Office in Alpharetta. It should be a blast, and went really well in Ohio (Columbus) and North...
on
17 Oct 2012
Blog Post:
The Get-MailboxStatistics Cmdlet, the TotalitemSize Property, and that pesky little “b”
Gary Siepser
In my experiences with Exchange and Powershell, I have definitely come across some interesting things. One of strangest…or so I thought…was the fact that whenever I looked at mailbox size it had a funny little “b” at the end and seemed to be in bytes. That little “b”...
on
19 Feb 2010
Blog Post:
Quick Script to Edit a Single Attribute in AD on a Single User Account
Gary Siepser
There are no real dependencies for this script, PSv1 or v2, no snap-ins, no modules….just plain old PS (POPS :) ). No magic happening here, just some basic read-host and ADSI in play. I wrote it for a colleague and thought I would share. #This will probably only work for strings and simple...
on
2 Feb 2010
Blog Post:
Demo of PowerShell Pipeline Behavior – Asynchronous vs. Synchronous
Gary Siepser
When I teach PowerShell classes I sometimes get into a discussion on the more advanced topic (at least for a beginner class) of pipeline behavior in terms of running multiple elements of a pipe synchronously or asynchronously. I usually have a tough time demo’ing this in a really meaningful way...
on
28 Jan 2010
Blog Post:
Using Microsoft's New AD PowerShell Cmdlets
Gary Siepser
In the past two weeks I have really started playing with the new AD PowerShell cmdlets from Microsoft. I am really glad these cmdlets are finally here. I will admit though, to get them working in my lab, it was not easy. I cant blame this though on the cmdlets themselves, as my problems stemmed from...
on
12 Nov 2009
Blog Post:
Example for Identifying Domain Controller Subnet Membership with PowerShell
Gary Siepser
First of all let me thank Rich Doyle (a fellow PFE) for allowing me to post this script. Rich writes some pretty kick-butt stuff and I know I speak for many of us that appreciate his help and his scripts! Now Rich claims he hacked this together and didn't get around to polishing it up with optimization...
on
23 Sep 2009
Blog Post:
Counting Public Folder SubFolders
Gary Siepser
This sample script was written by a brilliant fellow PFE named Chris Schrimsher. Chris gave me permission to post this script out there to the two of you reading my posts…you know who you are :) In this script there is a concept that he is using that I like. He uses a hash table (dictionary...
on
23 Sep 2009
Blog Post:
List Mailbox Sizes for both Exchange 2003 and Exchange 2007
Gary Siepser
This is a script I put together because…well I don't remember what prompted me to write it. Who cares :) This script uses the built-in cmdlets for Exchange 2007 find 2007 servers and legacy servers. It then uses WMI to talk to the legacy servers to get the mailbox sizes. Technically...
on
16 Sep 2009
Blog Post:
So many ways to take care of that poor old cat – Getting a list of just directories in PowerShell
Gary Siepser
Such a simple concept…how can we just retrieve a listing of folders instead of files and folders. Hopefully readers of this post know already that in PowerShell (1 or 2) we use “Get-ChildItem” (many still use the alias “dir”) to retrieve a listing of files and folders. If you didn't know...
on
20 Aug 2009
Blog Post:
Find Expiring Certificates Using PowerShell – One-Liner and a Script
Gary Siepser
This code is not really complicated at all. Just the same it can come in very handy, and some folks have never played with the Certificate provider. I have provided a one-liner version of this code, and a script version. They are basically the same, but certainly the script one is considerably...
on
12 Aug 2009
Blog Post:
Get Exchange Mailbox Database Size – One-Liner – Version 2
Gary Siepser
In my previous post ( Some Handy Exchange Mailbox and Database Size Powershell One-Liners ), I introduced a handy one-liner for looking up current mailbox database sizes. In Exchange 2007, the physical size of the database file isn't listed when you run a cmdlet like “get-mailboxdatabase”. ...
on
10 Aug 2009
Blog Post:
Lesson Learned Today about PowerShell’s .Net Type System
Gary Siepser
Today I was asked why this person saw more properties showing with a “format-table”, than with a “format-table *”. I will admit, I wasn't sure. I kicked myself later once I got the answer and I realized I should have known this. There is a PFE colleague of mine that always seems to...
on
5 Aug 2009
Blog Post:
Create Calendar Appointments Automatically Based on Existing Calendar Appointments - For my Fellow PFE Co-Workers (The Concepts are for Anyone)
Gary Siepser
Like my other PowerShell blog posts, this is a sample of what a script can do. This post is really meant for my PFE co-workers. I posted recently about using Outlook to simply list out calendar appointments with a basic filter. I finally had some time today during travel to Chicago...
on
2 Aug 2009
Blog Post:
One-Liner to List Calendar Appointments with a Simple Filter
Gary Siepser
So this post is born out of my playing with writing a script to help me be a better PFE. I need to automatically create calendar appoints to remind me to get all my PFE “paperwork” in on time. my colleagues will know what I am talking about when I say my TRs. My thought was to simply...
on
1 Aug 2009
Blog Post:
Simple Random Number Demonstration Script
Gary Siepser
I was delivering my session today at the Alpharetta (Atlanta) PFE Technology Day, and needed to come up with a good way to give away a free book to the class. Right before class I threw a little script together to use the random number capabilities of PowerShell. The script is below: ...
on
31 Jul 2009
Blog Post:
Simple but Handy Functions – Part 1 (The Functions Themselves, Detail About Them Coming Soon)
Gary Siepser
I thought I would share a few simple functions that I find handy. They are nowhere near rocket science but still worth it. I think they would make a nice addition to your PowerShell profile so they are available each time you load PowerShell. function Get-IP {ipconfig | where-object {$_ ...
on
31 Jul 2009
Blog Post:
Sample for Sending Email with PowerShell
Gary Siepser
I get asked quite often to show examples of sending an email from Powershell. This could easily by written into an actual cmdlet, and it wouldn't shock me a bit if it already has. Either way, its very simple .Net code to send email. In this script sample below, I am showing a small utility...
on
27 Jul 2009
Blog Post:
Simple Text Parse with Powershell using IPConfig.exe
Gary Siepser
Here is a fun little one-liner in Powershell: PS C:\> ipconfig | where-object {$_ -match "IPv4 Address"} IPv4 Address. . . . . . . . . . . : 1.2.3.4 This gets us just the lines from the IPConfig that list the IP address. This isnt text parsing, this is just filtering the...
on
24 Jul 2009
Blog Post:
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
Gary Siepser
I use PSObject all the time. Now when I write scripts I nearly always output an object and unless I can just add to an existing type that is close, I create my own. I copied from one of my recent ones below to show how I do it. Now this isn’t a complete script. $arrobjects would...
on
23 Jul 2009
Blog Post:
Some Handy Exchange Mailbox and Database Size Powershell One-Liners
Gary Siepser
I wrote this up a while ago to share with customers and colleagues, but I never really posted it anywhere. If you look at my previous post about using add-member, you might wonder why then I am using select-object here to create calculated properties which changes the pipeline to PSCustom objects...because...
on
23 Jul 2009
Blog Post:
Quick AD Search Example
Gary Siepser
I was emailing with another instructor tonight and wrote a quick snippet to search AD for an object with a particular SID. This is quick and way too simple for production, but it just shows how easily you can search AD. This is with Powershell v1 $searcher = new-object system.directoryservices...
on
23 Jul 2009
Blog Post:
Using Add-Member in a Powershell One-Liner to Create Calculated Properties
Gary Siepser
This is one of the live demos I do when I teach class. Its a slightly advanced concept for some of my students as it deals with object members. It is actually fairly nice looking code and I love the fact that I can maintain my original object (instead of say changing to a PSCustom object...
on
23 Jul 2009
Blog Post:
Creating a PS Credential from a Clear Text Password in Powershell
Gary Siepser
Before I begin here, let me say, this is very unsecure. There are very few times when doing this would be a good idea from a security standpoint. That being said, it is definately possible. First things first. We need to build a secure string for the password: PS C:\> $password ...
on
23 Jul 2009
Page 1 of 1 (23 items)