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
Microsoft  Office 365 Administration Cookbook

You're reading from   Microsoft Office 365 Administration Cookbook Enhance your Office 365 productivity with recipes to manage and optimize its apps and services

Arrow left icon
Product type Paperback
Published in Sep 2020
Publisher Packt
ISBN-13 9781838551230
Length 442 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Nate Chamberlain Nate Chamberlain
Author Profile Icon Nate Chamberlain
Nate Chamberlain
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Chapter 1: Office 365 Setup and Basic Administration 2. Chapter 2: Office 365 Identity and Roles FREE CHAPTER 3. Chapter 3: Administering Office 365 with PowerShell 4. Chapter 4: Managing Exchange Online 5. Chapter 5: Setting Up and Configuring Microsoft Search 6. Chapter 6: Administering OneDrive 7. Chapter 7: Configuring the Power Platform 8. Chapter 8: Administering SharePoint Online 9. Chapter 9: Managing Microsoft Teams 10. Chapter 10: Configuring and Managing Users in Azure Active Directory (Azure AD) 11. Chapter 11: Understanding the Microsoft 365 Security & Compliance Center 12. Chapter 12: Deploying Data Loss Prevention and eDiscovery 13. Chapter 13: Monitoring Office 365 Apps and Services 14. Chapter 14: Appendix – Office 365 Subscriptions and Licenses
15. Other Books You May Enjoy

Adding/removing users via PowerShell in AAD

This recipe should begin to get you thinking about how you could potentially automate regular processes in your organization by utilizing PowerShell as part of your automated job. While we'll manually add a user to Azure AD in this recipe, you could have the same PowerShell script run based on a trigger from your HR system, by way of an example. For now, we'll start with the basics – running the script itself manually to add a user.

Getting ready

You must be a global administrator to complete the steps in this recipe.

How to do it…

  1. Open Windows PowerShell (or your PowerShell client of choice) as the administrator.
  2. Connect to Azure AD using Connect-AzureAD.
  3. Use a script such as the following, replacing the user's specific info where appropriate.
    $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile
    $PasswordProfile.Password = "aBc123!ndc"
    New-AzureADUser...
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