Hi folks. It's your friendly, neighborhood PFE again. In order to avoid the long lines to buy a treadmill the first week of January I thought I would save you some time and give you an easier New Years Resolution… Learn PowerShell.
For years many of us have relied on trusty command line utilities like PING, IPCONFIG, and REPADMIN. Some of us are still hanging on to those instead of embracing the brave new world of PowerShell.
In an effort to assist with the transition and to introduce some of the cool new cmdlets in PowerShell v3 I have created a free reference guide showing how the old meets the new. For example, instead of PING try the PowerShell cmdlet Test-Connection, instead of NSLOOKUP use Resolve-DNSName, instead of GPUPDATE use Invoke-GPUpdate.
The guide attached at the bottom of this blog post contains four packed pages of PowerShell pleasure for your perusing.
Why would someone want to use PowerShell instead of command line utilities? There are several reasons:
While studying the new 2012 cmdlets in preparation for conference talks last summer I created a quick cheat sheet for PowerShell equivalence to REPADMIN and DNSCMD. The other day I sat down and expanded this to include a raft of familiar utilities:
REPADMIN DCPROMO CSVDE NETDOM NLTEST GPUPDATE GPRESULT
DSGET DSQUERY DSADD DSMOD DSRM DSMOVE DSACLS
DNSCMD NSLOOKUP PING IPCONFIG NETSTAT
This guide will get you off and running to convert any old batch files you still have lying around or hiding in scheduled tasks.
Yes. I know that sounds like a lot to learn, but the good news is I can't remember them all either. I work for Microsoft, and I still use Show-Command, Get-Command, and Get-Help on a daily basis. That's why we put those cmdlets in the box. With over 2,400 cmdlets now there's a good chance we've got you covered for anything you need. If not, let us know on the Connect site.
There are so many command line utilities out there that I had to limit my focus to those related to Active Directory. Hopefully this post will inspire others in the community to compile similar guides for their technologies.
I created this guide based on my personal knowledge of the tools and the help text that they print. In other words this is not a top secret guide published by Microsoft product groups, and I have not tested every single entry. Some of these will require you to use Get-Help to explore the capabilities. I built this by hand in Excel, so you may be able to find some gaps in the list. If you find any omissions or corrections please send them my way, and I'll update the document.
Enjoy. Happy New Year!
photo credit: eccampbell via photopin cc
If you would like to have me or another Microsoft PFE visit your company and assist with the ideas presented in this blog post, then contact your Microsoft Premier Technical Account Manager (TAM) for booking information.
For more information about becoming a Microsoft Premier customer email PremSale@microsoft.com. Tell them GoateePFE sent you.
This is great Ashley, already printed it out and tweeted. You are definitely the number one guy when it comes to AD and powershell. Happy New Year!
Do you know if the version 3 AD cmdlets are available in a 2008R2 domain if you load the AD Powershell module from a Windows 8 workstation with RSAT installed?
That is correct. The RSAT installed determines the level of functionality for the AD Module. With the Windows 8 RSAT you can target any DC running the AD web service (2003, 2008, 2008 R2, 2012) to use all of the latest cmdlets. Obviously 2003 and 2008 would need the ADMGS install (http://aka.ms/ADPS2003). Conversely the Windows 7 RSAT can access 2012 DCs using the older cmdlets only.
this is cool, thanks
Awesome sheet, i bet people at Ask Directory Services Team blog would be glad to share the word !
I do see ping but missing tracert or am I still blurry from NYE.
Thanks for the PowerShell Guide. I'm going to review it now and hope to draw some things to share with my team.
Awesome thanks Ashley =)
Well done Ashley! This is just the sort of thing that has been missing for a long time. Thanks for doing the work and producing this excellent documentation!
I was about to send this to Mike when I saw his comment.
Ashley, THANK YOU VERY MUCH for this wonderful document. I observed that DCDIAG is not covered in this document. Hope you add it in next version of this document. Thanks again.