Using PowerShell Magic to Manage Microsoft Office 365 OUC-B322 Using PowerShell Magic to Manage Microsoft Office 365 Danny Burlage Office 365 MVP
Why PowerShell? It just helps you to be more productive TechEd 2013 11/23/2018 2:38 PM Why PowerShell? It just helps you to be more productive You will also need it to implement Office 365 components like ADFS Creating a lot of SharePoint Online sites Creating a Shared Mailbox in Exchange Online Migrating a User Mailbox to a Shared Mailbox Performing standard tasks on lots of mailboxes, users or sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Before we get started Base OS .NET Framework 4.5 TechEd 2013 11/23/2018 2:38 PM Before we get started Base OS Windows Server 2012, Windows Server 2008 R2 SP1, Windows 8, Windows 7 SP1 .NET Framework 4.5 Windows Management Framework 3.0 Microsoft Online Services Sign-in Assistant All the latest updates .NET Framework 4.5 and Windows Management Framework 3.0 are included in Windows 8 and Windows Server 2012 Windows Azure AD Module for Windows PowerShell 32-bit Windows Azure AD Module for Windows PowerShell 64-bit SharePoint Online Management Shell © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Integrated Scripting Environment Don’t use the traditional PowerShell windows, use ISE!
Windows Azure AD
PowerShell for Windows Azure AD Basic operations for management of the Office 365 tenant, user management
Basic User Operations
What have you just seen? $msolcred = get-credential connect-msolservice -credential $msolcred New-MsolUser Set-MsolUserPassword
Basic Group Operations
What have you just seen? Get-MsolGroup New-MsolGroup Add-MsolGroupMember
Role Operations
What have you just seen? Get-MsolRole Get-MsolRoleMember Add-MsolRoleMember
Managing Subscriptions
What have you just seen? Get-MsolSubscription Get-MsolAccountSku New-MsolLicenseOptions Set-MsolUserLicense
Let’s get advanced
What you have seen Batch Import users from CSV http://gallery.technet.microsoft.com/office/Bulk-import-the-user-568abc5f How to use PowerShell to Automatically Assign Licenses to your Office365 Users http://social.technet.microsoft.com/wiki/contents/articles/15905.how-to-use-powershell-to-automatically-assign-licenses-to-your-office365-users.aspx
Exchange Online
PowerShell for Exchange Online Very rich and PowerFull set of commands Almost all operations which are available for Exchange on premise are available for Exchange Online Overview of all cmdlts: http://technet.microsoft.com/en-us/library/bb124413(v=exchg.150).aspx
Connecting to the service
What have you just seen? $Cred = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection Import-PSSession $Session
Working with users
What have you just seen? Get-User -Filter "Department -eq 'Customer Service'" | Set-Mailbox -MaxSendSize 2097152 Set-UserPhoto "MOD Administrator" -PictureData ([System.IO.File]::ReadAllBytes("C:\SAMOptimizationKit\marlies.jpg"))
Managing a security group
What have you just seen? Get-Group new-distributiongroup -name "[Group's Name]" -alias "[Group's Alias]" -type "security" -primarysmtpaddress "[your_address@your_domain]“ get-distributiongroup -identity [Group's Name or Email Address] | format-list
Let’s get more advanced
What have you just seen? Convert User to a Shared Mailbox http://blogs.technet.com/b/kpalmvig/archive/2013/02/28/office-365-convert-user-mailbox-to-shared-mailbox.aspx Setting up a Shared Mailbox http://blogs.msdn.com/b/microsoft_cloud/archive/2011/11/18/set-up-shared-mailboxes-in-office-365.aspx Export list of Exchange Permissions http://gallery.technet.microsoft.com/scriptcenter/Export-mailbox-permissions-d12a1d28
SharePoint Online
PowerShell and SPO About 30 cmdlts available (compared to hundreds in SharePoint On Premise) NoWait parameter added
Basic operations
What have you just seen? Connect-SPOService Get-SPOSite Get-SPOWebTemplate New-SPOSite New-SPOSiteGroup Add-SPOUser
More advanced operations TechEd 2013 11/23/2018 2:38 PM More advanced operations Dynamically increase quota’s on site collections Create multiple sites through CSV file Getting a list external users © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Lync Online
Overview Not yet released PowerShell for Lync Online is only available upon request (Service Request), NDA, TDLA Only needed for specific scenario’s (Lync Room System, split domain, mass-operations)
Track resources Office 365 Blog: 11/23/2018 2:38 PM Track resources Office 365 Blog: http://blogs.office.com/b/microsoft_office_365_blog/ Twitter: Follow @ https://twitter.com/Office365 Connect: http://www.linkedin.com/groups/Microsoft-Office-365-3724282 Check out: Garage Series for IT Pros: www.microsoft.com/garage Office 365 FastTrack: http://fasttrack.office.com// © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Resources Learning TechNet msdn http://channel9.msdn.com/Events/TechEd 11/23/2018 2:38 PM Resources Learning Sessions on Demand http://channel9.msdn.com/Events/TechEd Microsoft Certification & Training Resources www.microsoft.com/learning TechNet msdn Resources for IT Professionals http://microsoft.com/technet Resources for Developers http://microsoft.com/msdn © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Complete an evaluation on CommNet and enter to win! 11/23/2018 2:38 PM Complete an evaluation on CommNet and enter to win! © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
MS tag Scan the Tag to evaluate this session now on myTechEd Mobile 11/23/2018 2:38 PM Required Slide *delete this box when your slide is finalized Your MS Tag will be inserted here during the final scrub. MS tag Scan the Tag to evaluate this session now on myTechEd Mobile © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
11/23/2018 2:38 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.