Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Windows Server 2016 Cookbook

You're reading from   Windows Server 2016 Cookbook Sauté your way through more than 100 hands-on recipes designed to prepare any server administrator to work with Windows Server 2016

Arrow left icon
Product type Paperback
Published in Nov 2016
Publisher Packt
ISBN-13 9781785883835
Length 494 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Jordan Krause Jordan Krause
Author Profile Icon Jordan Krause
Jordan Krause
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Learning the Interface FREE CHAPTER 2. Core Infrastructure Tasks 3. Security and Networking 4. Working with Certificates 5. Internet Information Services 6. Remote Access 7. Remote Desktop Services 8. Monitoring and Backup 9. Group Policy 10. File Services and Data Control 11. Nano Server and Server Core 12. Working with Hyper-V

Searching for PowerShell cmdlets with Get-Help

With this recipe, let's take a minute to use Get-Help inside PowerShell in order to, well, get some help! I see both new and experienced PowerShell administrators going to the Web a lot in order to find commands and the parameters of those commands. The Internet is great, and there is a ton of data out there about how to use PowerShell, but in many cases the information that you are looking for resides right inside PowerShell itself. By using the Get-Help cmdlet combined with the functions you are running or searching for, you might not have to open that web browser after all.

Getting ready

We will be running some commands from inside PowerShell on a Windows Server 2016 machine.

How to do it…

To use the Get-Help function inside PowerShell, run the following steps:

  1. Launch a PowerShell prompt.
  2. Type Get-Help.
  3. You're finished! No, I'm just kidding. Using Get-Help by itself will present you with some helpful data about the Get-Help command, but that's not really what we are looking for, is it? How about using Get-Help with a search parameter, like this:
          Get-Help Computer
    

    How to do it…

    Cool! That searched the available cmdlets and presented us with a list of the ones that contain the word Computer. Nice.

  4. Now, what if we wanted to find out some more particular information about one of these cmdlets? Maybe about Restart-Computer; that sounds like something we might use often. Use the following command:
          Get-Help Restart-Computer
    

    How to do it…

    Now we're really cooking! This is wonderful information. Basically, this is exactly what you would find if you were looking for information about the Restart-Computer cmdlet and went searching on TechNet for it.

How it works…

The Get-Help cmdlet in PowerShell can be used with virtually any command in order to find out more information about that particular function. I often use it when the specific name of a cmdlet that I want to use escapes my memory. By using Get-Help as a search function, it will present a list of available cmdlets that include the keyword you specified. This is a brilliant addition to PowerShell, and makes it so much more powerful than Command Prompt.

Also included with the Get-Help files are all of the special syntax and parameter options for each cmdlet that you might be working with. This saves you having to go to the Web in order to search for these functions, and it is just way more fun doing it at the command line than in a web browser.

You have been reading a chapter from
Windows Server 2016 Cookbook
Published in: Nov 2016
Publisher: Packt
ISBN-13: 9781785883835
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image