The top ten PowerShell commands for Exchange

Slides:



Advertisements
Similar presentations
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

5/29/2018 1:51 AM THR2071 Managing enterprise applications, permissions, and consent in Azure Active Directory Adam Steenwyk & Jeff Sakowicz Program Managers.
6/5/2018 1:30 PM THR1029 Spend less time managing data and more time with customers: Quick tour of Outlook Customer Manager Welly Lee
Azure Cloud Shell Magic of Modern Command-line Management
Get Typed with TypeScript!
Decoding audit events in Microsoft Office 365
Performing a Seamless Migration in Azure SQL DB
What a Real, Functioning DevOps Team Looks Like
Virtual Machine Diagnostics in Microsoft Azure
SQL Server on Linux on All-Flash Arrays
Workflow Orchestration with Adobe I/O
Customize Office 365 Search and create result sources
How we got a traditional bank collaborating across boundaries
User Group Best Practices
Gover'nuisance' explained in la(z)yman's terms
Automate all things! Microsoft Azure continuous deployment
Agile Planning with Visual Studio Team Services (VSTS)
Microsoft Ignite /17/ :56 PM
Servicing Windows 10 in the Real World
9/22/2018 3:49 AM BRK2247 Learn from MVPs: Panel discussion on all things SharePoint and OneDrive © Microsoft Corporation. All rights reserved. MICROSOFT.
Azure PowerShell Aaron Roney Senior Program Manager Cormac McCarthy
Continuous Delivery with Visual Studio Team Services
Supercharge Microsoft Teams using Teams apps in node.js
Azure Advisor: Optimization in the best way
Title of Presentation 12/2/2018 3:48 PM
Accelerate Office 365 Adoption Through Microsoft FastTrack Services
Microsoft products for non-profits
Introduction to ASP.NET Core 1.0
Five cool things you can do with Windows PowerShell on Office 365
Microsoft To-Do Preview
Yammer for IT Tom Kretzmer Solutions Developer, Westinghouse THR1016
Microsoft Exchange: Through the eyes of MVPs (Panel discussion)
Overview: Dynamics 365 for Project Service Automation
Surviving identity management in a hybrid world
Hostage Negotiation, Special Ops and Office 365 Adoption
Sami Laiho AMA - Ask Me Anything
Breaking Down the Value of A Yammer Post: 20 Things to Do
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Cool Microsoft Edge Tips and Tricks
When Bad Things Happen to Good Applications
Getting the most out of Azure resources with Azure Advisor
“Hey Mom, I’ll Fix Your Computer”
Windows 8 Security Internals
4/21/2019 7:09 AM THR2098 Unlock New Opportunities with Nintex Hawkeye Process Intelligence and Workflow Analytics Sr. Product.
Business Continuity and the Microsoft Cloud
4/28/2019 3:30 AM THR1061 Learn how Dynamics 365, Office 365 and related applications work together to transform the workplace Donna Edwards Solution Architect.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Consolidate, manage, backup, and secure your cloud content
Designing Bots that Fit Your Organization
Ask the Experts: Windows 10 deployment and servicing
Passwordless Service Accounts
Шитманов Дархан Қаражанұлы Тарих пәнінің
Digital Transformation: Putting the Jigsaw Together
WCF and .NET Framework Microservices in Containers
Diagnostics and troubleshooting in Azure App Service Support Center
Optimizing your content for search and discovery
Title of Presentation 5/24/2019 1:26 PM
Presentation transcript:

The top ten PowerShell commands for Exchange 5/23/2018 7:15 AM THR2088 The top ten PowerShell commands for Exchange Steve Goodman Content and Code MVP, Office Servers & Services @SteveGoodman | www.allabout365.com © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

The top ten PowerShell commands for Exchange These are commands I couldn’t do without Don’t worry - the top command is not Get-Mailbox Hopefully some of the of the commands might surprise you…. And there’s a LOT to choose from…

5/23/2018 7:15 AM 10 © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Get-Help Every Exchange admin needs a little help sometimes, right? 5/23/2018 7:15 AM Get-Help Every Exchange admin needs a little help sometimes, right? © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Using Get-Help Get-Help New-Transportrule –Examples Get-Help New-OWAVirtualDirectory -Online © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

9 5/23/2018 7:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Get-Content Examine your log files. Watch them in real-time © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Using Get-Content Get-Content (file) –Tail 1 –Wait 5/23/2018 7:15 AM Using Get-Content Get-Content (file) –Tail 1 –Wait $File = Get-Content (file) $File[1] © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

8 5/23/2018 7:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Select-Object Pick what you need, nothing else 5/23/2018 7:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5/23/2018 7:15 AM Using Select-Object Get-Mailbox | Select DisplayName, SamAccountName, UserPrincipalName, PrimarySMTPAddress Get-MailboxStatistics –Database (DB) | Select DisplayName,TotalItemSize © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

7 5/23/2018 7:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5/23/2018 7:15 AM Start-Transcript What was it I did to my Exchange Server the other day? © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Using Start-Transcript and Stop-Transcript 5/23/2018 7:15 AM Using Start-Transcript and Stop-Transcript Start-Transcript # Do all sorts of damage, but it’s OK because you had a change request approved Stop-Transcript © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

6 5/23/2018 7:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Test-NetConnection Still using Telnet to check ports are open? 5/23/2018 7:15 AM Test-NetConnection Still using Telnet to check ports are open? © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Using Test-NetConnection 5/23/2018 7:15 AM Using Test-NetConnection Test-NetConnection outlook.office365.com –Port 25 Test-NetConnection outlook.office365.com -Traceroute © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5 5/23/2018 7:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5/23/2018 7:15 AM Export-CliXML Keep your Exchange command output for later and play it again later! © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Using Import-CliXML and Export-CliXML 5/23/2018 7:15 AM Using Import-CliXML and Export-CliXML Get-Mailbox –ResultSize Unlimited | Export-CliXML .\Mailboxes.XML # Copy it somewhere else Import-CliXML .\Mailboxes.XML © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

4 5/23/2018 7:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5/23/2018 7:15 AM Out-Gridview View and manipulate your Exchange information from the command prompt – in a GUI! © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Using Out-GridView Get-Mailbox | Out-Gridview 5/23/2018 7:15 AM Using Out-GridView Get-Mailbox | Out-Gridview Get-ExchangeServer | Out-GridView Get-User | Out-GridView © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

3 5/23/2018 7:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5/23/2018 7:15 AM foreach Do something to each of the items in a list. To every mailbox, to every virtual directory, to every server.. © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Using foreach $Mailboxes = get-mailbox 5/23/2018 7:15 AM Using foreach $Mailboxes = get-mailbox Foreach ($Mailbox in $Mailboxes) { get-user –identity $mailbox.userprincipalname } © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2 5/23/2018 7:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Where Just get the information you need, from any command 5/23/2018 7:15 AM Where Just get the information you need, from any command © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5/23/2018 7:15 AM Using Where Get-Mailbox | Where {$_.EmailAddressPolicyEnabled –eq $False} Get-ExchangeServer | Where {$_.Name –like “SG*”} © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1 5/23/2018 7:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5/23/2018 7:15 AM Export-CSV The key command for making it easy to generate reports and manipulate other date outside of Exchange © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5/23/2018 7:15 AM Using Export-CSV Get-WebServicesVirtualDirectory | Select Server,InternalURL,ExternalURL | Export-Csv –NoTypeInformation .\EWSVirtualDirectories.CSV Get-Mailbox | Get-MailboxStatistics | Select DisplayName,TotalItemSize | Export-Csv –NoTypeInformation .\MailboxSizes.CSV © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

What is YOUR top Powershell command for Exchange? Thank you! Hopefully these Powershell commands will make your life, as an Exchange admin a little easier Let me know either now, or on twitter @stevegoodman What is YOUR top Powershell command for Exchange?

Please evaluate this session Tech Ready 15 5/23/2018 Please evaluate this session From your Please expand notes window at bottom of slide and read. Then Delete this text box. PC or tablet: visit MyIgnite https://myignite.microsoft.com/evaluations Phone: download and use the Microsoft Ignite mobile app https://aka.ms/ignite.mobileapp Your input is important! © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.

5/23/2018 7:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.