Free Download: CMD to PowerShell Guide for AD

New Years ResolutionSkip the treadmill.  Learn PowerShell.

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.

It's time to part with "blankie".

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:

  1. Command line utilities often give us the data we want, but it is flat text that requires parsing to do anything else with it. Have you ever scripted a command line PING and tried to find the result? Yeah, I have, and it's a pain. Now with PowerShell you can simply reference the ping result properties coming back to easily get the actual data involved.
  2. Is your favorite command line utility always available? When you would RDP to a server back in the day you had no idea if the adminpak.msi or the Windows Resource Kit was installed. Now you know that PowerShell is always there on Windows Server 2008 R2 and above.
  3. PowerShell cmdlets mostly use the same syntax. You no longer have to figure out what the right switch is for the remote computer name. Now it is always "-ComputerName".
  4. PowerShell is not just the future, it's now. Version 1 was released five years ago. Now all of the Microsoft server products use PowerShell. Windows 8 and Server 2012 now have thousands of cmdlets at your finger tips.

Free Download

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:




This guide will get you off and running to convert any old batch files you still have lying around or hiding in scheduled tasks.

Four pages. Really?

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

PowerShell Cmd Line Conversion Guide AD.pdf

Comments (22)
  1. Mike Kline says:

    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!



  2. LA Richards says:

    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?

  3. Hello LA,

    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 (  Conversely the Windows 7 RSAT can access 2012 DCs using the older cmdlets only.


  4. anonymouscommenter says:

    this is cool, thanks

  5. Patris_70 says:

    Excellent 🙂


  6. anonymouscommenter says:

    Awesome sheet, i bet people at Ask Directory Services Team blog would be glad to share the word !

  7. anonymouscommenter says:

    I do see ping but missing tracert or am I still blurry from NYE.

  8. anonymouscommenter says:


    Thanks for the PowerShell Guide.  I'm going to review it now and hope to draw some things to share with my team.

  9. Awesome thanks Ashley =)

  10. anonymouscommenter says:

    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!

  11. anonymouscommenter says:

    Wonderful Resource!

  12. I was about to send this to Mike when I saw his comment.

  13. VenkatSP says:

    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.

  14. Someone asked if there are any updates for Windows Server 2012 R2. Run this on 2012 R2: "PS> Get-Command *AuthenticationPolicy*" These are the only new AD cmdlets. These are for a new feature and have no CMD equivalence to update on the sheet.

  15. anonymouscommenter says:

    Welcome! Today’s post includes demo scripts and links from the Microsoft Virtual Academy event: Using PowerShell for Active Directory . We had a great time creating this for you, and I hope you will share it with anyone needing to ramp up their

  16. anonymouscommenter says:

    Hey y’all, Mark and Tom back with our second Friday mailbag. So far so good on trying to keep our

  17. anonymouscommenter says:

    Its really Superb! Very useful.. Thank you very much

  18. Raymond Peng says:

    great write-up , was looking to migrate to PS from previous CLI, awesome!!

  19. Adeel Aleem says:

    Awesome.! Sir you did a great job and this pdf will help me alot…. Thanks and appreciate your effort.

  20. chris harris says:

    Great guide BUT no dnscmd /exportsettings conversion 🙁

  21. Anonymous says:
    (The content was deleted per user request)

Comments are closed.

Skip to main content