27
Making Administration Easy with Office 365 and PowerShell Presented by : Robert Crane BE MBA MCP [email protected] Computer Information Agency http://www.ciaops.com #ciaops

Getting Started with PowerShell for Office 365

Embed Size (px)

DESCRIPTION

This presentation takes your through the basics of connecting to Office 365 using PowerShell. You'll see how to connect as well as a number of handy commands to make administration of Office 365 easier.

Citation preview

Page 1: Getting Started with PowerShell for Office 365

Making Administration Easy with Office 365 and PowerShell

Presented by :Robert Crane BE MBA [email protected] Information Agency

http://www.ciaops.com

#ciaops

Page 2: Getting Started with PowerShell for Office 365

PowerShell basics Advantages of PowerShell Configuring for Office 365 access Connecting to Office 365 Helpful commands

2

Agenda

Page 3: Getting Started with PowerShell for Office 365

3

PowerShell

Scripting language Included in most Windows OS On premise and Cloud Is how even the GUI console

execute Syntax is normally:

Command -<parameters>

Page 4: Getting Started with PowerShell for Office 365

4

Advantages of PowerShell Fast Time saving Easy to apply again and again Ability to combine commands into

scripts Works with all Microsoft products No real equivalent for other

hosted platforms

Page 5: Getting Started with PowerShell for Office 365

Online Sign in assistant

5

Microsoft Online Services Sign in Assistant

Page 6: Getting Started with PowerShell for Office 365

Azure AD Module

6

Windows Azure Active Directory Module for Windows PowerShell

Page 7: Getting Started with PowerShell for Office 365

7

SharePoint Online

SharePoint Online Management Shell– Requires:

Windows Management Framework 3.0 .NET v4.0

Page 8: Getting Started with PowerShell for Office 365

8

Lync Online

Lync Online Management Shell– Requires:

Windows Management Framework 3.0 .NET v4.0

Page 9: Getting Started with PowerShell for Office 365

9

Execution policy

set-executionpolicy remotesigned

Page 10: Getting Started with PowerShell for Office 365

10

Load Online commands

import-module msonline

Page 11: Getting Started with PowerShell for Office 365

11

Get login

$cred=get-credential

Page 12: Getting Started with PowerShell for Office 365

12

Connect to Office 365

connect-msolservice –credential $cred

Page 13: Getting Started with PowerShell for Office 365

DEMO

13

Page 14: Getting Started with PowerShell for Office 365

14

Connect to Exchange Online

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection

Import-PSSession $Session

Page 15: Getting Started with PowerShell for Office 365

15

Connect to SharePoint Online

import-module microsoft.online.sharepoint.powershell

connect-sposervice –url https://<yourtenant>-admin.sharepoint.com –credential $cred

Page 16: Getting Started with PowerShell for Office 365

16

Connect to Lync Online

import-module lynconlineconnector

$session = New-CsOnlineSession -Credential $cred

Import-PSSession $session

Page 17: Getting Started with PowerShell for Office 365

DEMO

17

Page 18: Getting Started with PowerShell for Office 365

18

Create a new users

new-msoluser –userprincipalname [email protected] –displayname ‘Steve Johnson’ –firstname Steve – Lastname Johnson –licenseassignment ciaops365e1:ENTERPRISEPACK –licenseoptions $options –usagelocation AU

Page 19: Getting Started with PowerShell for Office 365

19

Change to shared mailbox

set-mailbox –identity [email protected] –type shared

Page 20: Getting Started with PowerShell for Office 365

20

Set password

set-msoluserpassword –userprincipalname <Microsoft Online Services ID> -newpassword <Password> -forcechangepassword $false

Page 21: Getting Started with PowerShell for Office 365

21

Mailbox rights

add-mailboxpermission –identity <Microsoft Online Services ID target> -user <Microsoft Online Services ID source> -accessrights fullaccess –inheritancetype all

Page 22: Getting Started with PowerShell for Office 365

DEMO

22

Page 23: Getting Started with PowerShell for Office 365

Summary

23

PowerShell is for IT Pros

Fast way to manage many Microsoft products

Reuse scripts

Functionality will increase

Page 24: Getting Started with PowerShell for Office 365

Book

24www.ciaops.com/

publications

Page 25: Getting Started with PowerShell for Office 365

Feedback

Questions / queries?

25

Page 26: Getting Started with PowerShell for Office 365

Resources Microsoft Online Services Sign In Assistant - http://

www.microsoft.com/en-us/download/details.aspx?id=39267

Windows Azure Active Directory Module for Windows PowerShell – – 32 bit - http://go.microsoft.com/fwlink/p/?linkid=236298 – 64 bit - http://go.microsoft.com/fwlink/p/?linkid=236297

Windows Management Framework 3.0 - http://www.microsoft.com/en-us/download/details.aspx?id=34595

SharePoint Online Management Shell - http://www.microsoft.com/en-us/download/details.aspx?id=35588

Lync Online Management Shell - http://

www.microsoft.com/en-us/download/details.aspx?id=39366 26

Page 27: Getting Started with PowerShell for Office 365

27

Robert [email protected]

blog.ciaops.com