Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PowerShell for Office 365

You're reading from   PowerShell for Office 365 Automate Office 365 administrative tasks

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781787127999
Length 222 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Prashant G Bhoyar Prashant G Bhoyar
Author Profile Icon Prashant G Bhoyar
Prashant G Bhoyar
Martin Machado Martin Machado
Author Profile Icon Martin Machado
Martin Machado
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. PowerShell Fundamentals FREE CHAPTER 2. Managing Office 365 with PowerShell 3. Azure AD and Licensing Management 4. Managing SharePoint Online Using PowerShell 5. Managing Exchange Online Using PowerShell 6. Script Automation 7. Patterns and Practices PowerShell 8. OneDrive for Business 9. PowerShell Core

How to get help with PowerShell

PowerShell comes with a lot of in-built cmdlets, and with the addition of every new module, the list of available cmdlets increases. You can use your favorite search engine to get more information on a cmdlet. You can do this from the PowerShell window as well. The cmdlet to get the help is this:

Get-Help nameofcmdlet

Here's an, for example:

Get-Help Get-Service

The following screenshot shows the output for the preceding command:

This is useful if we would like to get help but don't want to leave the Command Prompt.

If you would like to get help from the official online documentation, you can use the following cmdlet:

Get-Help Get-Service -online

This will open the online help manual of the cmdlet with your default browser:

If you would like to quickly check whether there are any commands available for a particular service, you can use the following cmdlet:

Get-Command *Service*

This will give all the commands that contain the Service service in all the modules that are loaded:

What is a module?

A module is a combination of multiple PowerShell functionalities like scripts, cmdlets that are built to solve a common purpose. For example, to work with the users and licensing, we have to use the Module MSOnline provided by the Microsoft. You can find more information about the Windows PowerShell module here https://msdn.microsoft.com/en-us/library/dd878324(v=vs.85).aspx.

To find out the members of a cmdlet, we can pipe the Get-Member cmdlet with another cmdlet:

Get-Service | Get-Member

The following screenshot shows the output for the preceding command:

What is a pipe?

Using the pipe character (|), we can select the objects and then perform an action on them.

These three cmdlets--Get-Command, Get-Help, and Get-Member--are important to understand and use, especially when you are new to PowerShell. If you take a closer look, you will find the highlighted letters spell Microsoft compiled HTML help (.chm) files, which were the old-school help files available in Windows. We will use them throughout the book to get additional information on the commands we will use.

You have been reading a chapter from
PowerShell for Office 365
Published in: Jul 2017
Publisher: Packt
ISBN-13: 9781787127999
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 £16.99/month. Cancel anytime