Why doesn’t Get-Command display the expected results?

by Mitch Tulloch [Published on 14 Aug. 2013 / Last Updated on 14 Aug. 2013]

A tip on why Get-Command might not display the expected results.

If you run the command Get-Command *dhcp* on a clean install of Windows Server 2012, you won’t get any results. That’s because Get-Command can display commands only for Windows PowerShell modules that are installed on the server, and the module for DHCP isn’t installed until you add the DHCP Server role to your server.

Mitch Tulloch is a nine-time recipient of the Microsoft Most Valuable Professional (MVP) award and a widely recognized expert on Windows administration, deployment and virtualization.  For more information see http://www.mtit.com. This tip was excerpted from his latest book Training Guide: Installing and Configuring Windows Server 2012 from Microsoft Press.

The Author — Mitch Tulloch

Mitch Tulloch is a widely recognized expert on Windows administration, networking, and security. He has been repeatedly awarded Most Valuable Professional (MVP) status by Microsoft for his outstanding contributions in supporting users who deploy and use Microsoft platforms, products and solutions. Mitch has published over two hundred articles on different IT websites and magazines, and he has written or contributed to almost two dozen books and is lead author for the Windows 7 Resource Kit from Microsoft Press. For more information, see www.mtit.com .

Latest Contributions

Featured Links