TechNet
Products
IT Resources
Downloads
Training
Support
Products
Windows
Windows Server
System Center
Internet Explorer
Office
Office 365
Exchange Server
SQL Server
SharePoint Products
Lync
See all products »
Resources
Curah! curation service
Evaluation Center
Learning Resources
Microsoft Tech Companion App
Microsoft Technical Communities
Microsoft Virtual Academy
Script Center
Server and Tools Blogs
TechNet Blogs
TechNet Flash Newsletter
TechNet Gallery
TechNet Library
TechNet Magazine
TechNet Subscriptions
TechNet Video
TechNet Wiki
Windows Sysinternals
Virtual Labs
Solutions
Networking
Cloud and Datacenter
Security
Virtualization
Updates
Service Packs
Security Bulletins
Microsoft Update
Trials
Windows Server 2012 R2
System Center 2012 R2
Microsoft SQL Server 2012 SP1
Windows 8.1 Enterprise
See all trials »
Related Sites
Microsoft Download Center
TechNet Evaluation Center
Drivers
Windows Sysinternals
TechNet Gallery
Training
Training Catalog
Class Locator
Microsoft Virtual Academy
Free Windows Server 2012 courses
Free Windows 8 courses
SQL Server training
e-Learning overview
Certifications
Certification overview
MCSA: Windows 8
Windows Server Certification (MCSE)
Private Cloud Certification (MCSE)
SQL Server Certification (MCSE)
Other resources
TechNet Events
Second shot for certification
Born To Learn blog
Find technical communities in your area
Support options
For small and midsize businesses
For enterprises
For developers
For IT professionals
From partners
For technical support
Support offerings
For home users
More support
Microsoft Premier Online
Microsoft Fix It Center
TechNet Forums
MSDN Forums
Security Bulletins & Advisories
International support solutions
Log a support ticket
Not an IT pro?
Microsoft Customer Support
Microsoft Community Forums
Sign in
Mitch Klann's Blog - Mostly Automated
Tags
Exchange
LDAP
Powershell
Browse by Tags
TechNet Blogs
»
Mitch Klann's Blog - Mostly Automated
»
All Tags
»
powershell
Related Posts
Blog Post:
Log-Event
mitchk2
Recently I had a need to write to the event logs using PowerShell. I knew there was a built in command for this action so I decided to test it out. After some time using the Write-EventLog cmdlet, I kept getting errors generated which seemed to be symptoms from the following constraints of the event...
on
31 Dec 2014
Blog Post:
Shutting Down an Exchange Site
mitchk2
The argument could be made that this script is not something that has a practical use. One of my customers had a requirement to quickly (and gracefully) shut down an entire site of Exchange servers. I assume the scenario would be due to some kind of natural disaster or cooling issue in a datacenter....
on
1 Sep 2014
Blog Post:
Caching Objects in PowerShell – Part 2
mitchk2
In my previous post about this subject, I demonstrated how to cache objects using an XML file. Let’s take a look at how to load, manipulate and save the data again. Since the Export-Clixml cmdlet retains the data type in the XML file, we can perform actions on the objects in memory that are type-specific...
on
1 Aug 2014
Blog Post:
Caching Objects in PowerShell – Part 1
mitchk2
In the first section of this two part series, I will discuss caching objects to disk in PowerShell, and reading the cache back into memory. I recently came up with this solution at a customer site where I was running a script as a scheduled task and needed some data to persist after the task was complete...
on
1 Jul 2014
Blog Post:
PowerShell Performance: Write-Host
mitchk2
This month’s post will be a short one – and there’s not much code to this topic, it’s just an observation. When I write scripts, I like the idea of adding some output to track what my script is doing, especially if there’s an issue with the script. It’s so much easier to find bugs or performance issues...
on
31 Mar 2014
Blog Post:
Estimating/Calculating Execution Time
mitchk2
Over the years, I’ve noticed that I develop a general routine depending on the needs of my current customer. When I get to work in the morning I generally check a few items that I know can develop into hot button issues. As a general rule, if I am going to repeat a task more than a few times, I...
on
28 Feb 2014
Blog Post:
Collecting Mailbox Counts per Database Using LDAP
mitchk2
Recently I have been gathering a lot of mailbox data for a customer running Exchange 2010 that is in the process of upgrading from Exchange 2007. One of the more frequent requests has been for mailbox numbers, often broken out by database. It’s key to know the current state of your environment...
on
16 Jan 2014