/
Black Belt Exchange and Office 365 PowerShell Black Belt Exchange and Office 365 PowerShell

Black Belt Exchange and Office 365 PowerShell - PowerPoint Presentation

conchita-marotz
conchita-marotz . @conchita-marotz
Follow
481 views
Uploaded On 2016-09-03

Black Belt Exchange and Office 365 PowerShell - PPT Presentation

Steve Goodman Senior Consultant Ciber OFCB220 Welcome Steve Goodman Exchange Server MVP Senior Consultant as Ciber in the UK Writer for MSExchangeorg and SearchExchangecom Host of the UC Architects Podcast ID: 459868

powershell exchange 365 office exchange powershell office 365 microsoft http mailbox credential usercredential automate pssession import template goodman data

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Black Belt Exchange and Office 365 Power..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1
Slide2

Black Belt Exchange and Office 365 PowerShell

Steve GoodmanSenior Consultant, Ciber

OFC-B220Slide3

Welcome

Steve GoodmanExchange Server MVPSenior Consultant as Ciber in the UK

Writer for MSExchange.org and SearchExchange.com

Host of the UC Architects PodcastSlide4

Basics AutomationMonitoring

TroubleshootingUseful scripts

WelcomeSlide5

Basics AutomationMonitoring

TroubleshootingUseful scripts

AgendaSlide6

Starting with the basicsSlide7

Similar in concept to Unix-like management shellsSimpler in operation as PowerShell is object-oriented

Commands and parameters are easy to discover through the use of verbs and autocompletionFor example Get-Mailbox

,

Set-Mailbox

,

New-Mailbox

Firstname

–LastnamePass the output of one command to the next with the pipeline, or store in variablesGet-User | Set-User –Company Contoso$TemplateUser = Get-User “Template User”Get-User | Set-User –Company $TemplateUser.Company

Key concepts of PowerShell in one slideSlide8

PowerShell allows you to pretty much manage anything

We’ll focus on a few core Exchange and Office 365 technologies in this sessionExchange On-PremisesExchange OnlineWindows Azure Active Directory

What will we focus on managing?Slide9

What will we focus on managing?Slide10

Connecting to Exchange On-Premises

$

UserCredential

=

Get-Credential

$Session

=

New-

PSSession

-

ConfigurationName

Microsoft.Exchange

-

ConnectionUri

"

http://<

FQDN>/

PowerShell/"

-

Authentication

Kerberos

-

Credential

$

UserCredential

Import-

PSSession

$

Session

Get-Mailbox

"Steve Goodman"

Slide11

Connecting to Exchange Online

$

UserCredential

=

Get-Credential

$Session

=

New-

PSSession

-

ConfigurationName

Microsoft.Exchange

-

ConnectionUri

"https

://outlook.office365.com/

powershell-liveid

/"

-

Credential

$

UserCredential

-

Authentication

Basic

-

AllowRedirection

Import-

PSSession

$

Session

Get-Mailbox

"Lisa Goodman

"Slide12

Using Both

$

UserCredential

=

Get-Credential

$

CloudSession

=

New-

PSSession

-

ConfigurationName

Microsoft.Exchange

-ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $UserCredential -Authentication Basic -AllowRedirectionImport-PSSession $CloudSession -Prefix Cloud $OnPremSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "http://<FQDN>/PowerShell/" -Authentication Kerberos -Credential $UserCredentialImport-PSSession $OnPremSession Get-CloudMailbox "Lisa Goodman"Get-Mailbox "Steve Goodman"Slide13

Connecting to Azure Active Directory

$

UserCredential

=

Get-Credential

Connect-

MsolService

-Credential

$

UserCredential

Get-

MsolUser

-

UserPrincipalName

steve@goodman.net Slide14

Managing WAAD Sync Operations

Import-Module

DirSync

Start-

OnlineCoexistenceSync

Slide15

The ability to automate on-premises and cloud Exchange operations including…Creating new on-premises Active Directory accounts with Exchange

or Office 365 mailboxes attachedForcing creation in Office 365Assigning licensing to new Mailboxes in the Cloud

Assigning policies in Exchange Online

What does all that give us?Slide16

Exchange On-Premises

New-

RemoteMailbox

Set-

RemoteMailbox

Add-

DistributionGroupMember

DirSync

Start-

OnlineCoexistenceSync

Azure Active

Directory

Set-

MSOLUser

Set-

MSOLUserLicence

Exchange Online

Set-

CASMailbox

Set-

MailboxRegionalConfiguration

For example:Slide17

DemoSlide18

AutomationSlide19

Mailbox CreationsMailbox

DeletionsUpdate of email addressesRemoval of old addresses like X400 addressesAddition and removal from distribution

groups

Assigning policies to users, like In-Place Hold, Retention Policies, Mobile Device Policies

What

can

you automate?Slide20

Enable or disable OWA for usersEnabling users for Unified Messaging

Changing department or job title detailsUpdating contact phone numbers

Setting account expiry date

Re-balancing mailboxes across databases

Creating shared calendars with standard

settings

A few moreSlide21

Collection of information about the organizationRemediation of settings, such as UPN updates

Setup and configuration of Office 365 tenantsLicensing automation Mailbox Migration to Exchange 2013

Creating Migration Batches for Office 365 migrations

The list goes on..

Even more… and the list doesn’t end hereSlide22

Figure out what value you will get from automating using some sort of criteria, for example:Will you do it more than once?

This includes doing something once to everyone!Will it save you time to automate it?Sometimes a simple procedure is fine!

But what

should

you automate?Slide23

Can you avoid errors by automating it?

Or will it mean errors affect everyone else?Will you be able to delegate it?Replacing someone else doing it with the EAC with you doing it via PowerShell isn't greatCan you plug it into something else?

Does your service desk have the ability to interface with PowerShell?

But what

should

you automate?Slide24

If you know PowerShell, perform the task once using PowerShellStart-Transcript

If you don't know PowerShell wellIf it's on-premises Exchange, use the EAC or EMCIf it's not are their examples in the TechNet Gallery already?

Licensing is a good example

Rebalancing

More examples of my scripts

Learning from others is a GREAT WAY

Get the template for doing it onceSlide25

Get the template for doing it one timeBasic Script

InputVariablesLoopError Checking

For example:

Automate one time task

Disable ActiveSync for Group Members

Automate regular task

Setup Shared Mailbox

Assign Default Set of Permissions

Create the template for doing it onceSlide26

The template allows you to make it repeatable

Make a Basic ScriptDo you need input?

Do you have variables to set

Will you want to loop through a list (for example, mailboxes)

Should you check for errors?

A couple of demos….

Automate

a one

time task

Disable ActiveSync for Group Members

Automate a regular taskSetup Shared MailboxAssign Default Set of Permissions

Use the template for doing it onceSlide27

DemoSlide28

Monitoring and TroubleshootingSlide29

For pro-active monitoring, use an off-the-shelf solutionBut, there are times you want to gain an insight into your Exchange infrastructure

Getting a regular overview of the environmentCollecting data to monitor changes or growthExporting logs for historical value or to import into a third-party system,

Building a bespoke interface into your existing monitoring system

And of course – collecting data for Troubleshooting

Let’s have a look at a few examples…

What should you monitor?Slide30

You can export data from Exchange or Office 365 and store it, then compare historical data at a later dateFor example – keeping an record of mailbox growth

Use the Export-CliXML cmdlet to export the results of a PowerShell cmdlet as a point in time snapshot

Then use the

Import-

CliXML

cmdlet to import the snapshot at a later date for comparison

Monitoring your environment for growthSlide31

DemoSlide32

An example - troubleshooting Availability:

Switch on increased logging across all CAS serversRetrieve and

collate

logs, filtered for relevant errors from the Event Logs

Search

for particular errors in IIS Logs

Automating TroubleshootingSlide33

DemoSlide34

What is the Exchange Environment ReportUseful for:

Overview of patch levelsMailbox distribution across the environmentLast backups etc

Demo of usage and results

Generating Environment ReportsSlide35

Exchange Environment ReportSlide36

For example a report on your Office 365 tenantWe will use the following PowerShell features

Hashtables to store dataFunctions to collect individual pieces of data or output content

Output the results as HTML

Creating your own environment reportSlide37

DemoSlide38

SummarySlide39

Use PowerShell to automate management

Laborious tasks, Error prone tasksAutomation with PowerShell should equal less human mistakes (but test!)

Monitor

and report

using

PowerShell

You don't need to reinvent the wheel, good scripts are out there to assist

Don't create a new monitoring system, and use Managed Availability cmdlets

Use

PowerShell to switch on troubleshooting

and retrieve data centrallyAn Exchange admin's PowerShell knowledge extends outside of the Exchange Management Shell and also includes areas like Event Logs, Disks, Parsing Text Log FilesSummarySlide40

Resources

Learning

Microsoft Certification & Training Resources

www.microsoft.com/learning

Developer Network

http

://developer.microsoft.com

TechNet

Resources for IT Professionals

http://microsoft.com/technet

Sessions on Demand

http://channel9.msdn.com/Events/TechEdSlide41

Technical Network

Join the conversation!

Share

tips and best practices

with other

Office 365

experts

http://aka.ms/o365technetworkSlide42

Managing Office 365 Identities and Services

5

Office 365

Deploying

Office

365 Services

Classroom

training

Exams

+

Introduction

to

Office 365

Managing Office 365 Identities and Requirements

FLC

40041

Online

training

Managing Office 365 Identities and Services

Office 365

Fundamentals

http://bit.ly

/

O365-Cert

http://bit.ly

/

O365-MVA

http://bit.ly

/

O365-Training

Get

certified for

1/2 the price at TechEd Europe 2014!

http://bit.ly

/

TechEd-

CertDeal

MOC

20346

Designing for

Office

365

Infrastructure

MOC

10968

3

EXAM

346

EXAM

347

MVA

MVASlide43

TechEd Mobile app

for session evaluations

is

currently offline

SUBMIT YOUR TECHED EVALUATIONS

Fill out an evaluation via

CommNet Station/PC:

Schedule Builder

LogIn

:

europe.msteched.com/catalog

We value your feedback!Slide44

© 2014 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.