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
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

Common administrative cmdlets that are used for managing accounts and licensing


Office 365 is a subscription-based service, and it is important for organizations to manage the licenses of users, such as assigning a license to a new user, removing licenses, and activating new licenses in bulk.

Before assigning the license, let's see how we can filter users based on some criteria. For example, if you have users in multiple locations, we can use the following cmdlets to filter users based on the location Bethesda:

  1. Since PowerShell for Office 365 is used via remote management, as always the first step will be to connect to Office 365 and prove our identity:
        Import-Module MSOnline
        $cred = Get-Credential

This will launch the Windows PowerShell credential request dialog.

  1. Enter a valid Office 365 work or school User name and Password and click on OK:
  1. Now run the cmdlet:
        Connect-MsolService -Credential $cred

If the cmdlet is successful, it will not display an error message. This should...

lock icon The rest of the chapter is locked
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