Office PowerShell administration

Slides:



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

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Identity Management - Login © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
* Archiving provided by Exchange.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
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.
demo Default WANGPSLookup Default WANGPS.
Co- location Mass Market Managed Hosting ISV Hosting.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Multitenant Model Request/Response General Model.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
var site="s15gizmodo" var site="s15gizmodo"
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: OLE Notes Migration Utility
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
WinHEC /22/2017 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Connect with life Connect with life
Today’s Agenda
Windows Azure Connect Name Title Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
North America Region Europe Region Asia Pacific Region.
Feature: Suggested Item Enhancements – Sales Script and Additional Information © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
SQL Server SQL Azure Visual Studio“Quadrant” SQL Server Modeling Services Entity Framework ADO.NET“M”/EDM Data Services …
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
03 | Word Templates Brian Meier| Senior Lead Program Manager.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 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.
04 | Business Analyzer Brian Meier| Senior Lead Program Manager.
Demo Fest of Some Leading Store Apps Module 2.

6/17/2018 5:54 AM OSP322 Getting the best of both worlds, making the most of SharePoint hybrid search solutions Shyam Narayan Microsoft © 2013 Microsoft.
Возможности Excel 2010, о которых следует знать
SharePoint Online Management and Control
Title of Presentation 11/22/2018 3:34 PM
Using PowerShell Magic to Manage Microsoft Office 365
Office Mac /30/2018 © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Title of Presentation 12/2/2018 3:48 PM
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.
SharePoint 2013 Authentication with Azure – Part 1
Microsoft Build /20/ :42 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
PENSACOLA ENERGY WORK PLAN OCTOBER 10, 2016
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
SharePoint 2013 Authentication with Azure – Part 2
Title of Presentation 5/24/2019 1:26 PM
5/24/2019 6:44 PM 1/8/18 Bell #10 In a world governed by the gods, is there any room for human will? Do human choices make a difference? EXPLAIN © 2007.
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
Title of Presentation 7/24/2019 8:53 PM
Presentation transcript:

Office 365 - PowerShell administration 5/1/2018 Office 365 - PowerShell administration Ignacio Serrano / Madalina Florea Exchange Support Engineers © 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.

Agenda Introduction to PowerShell Requirement 5/1/2018 Agenda Introduction to PowerShell Requirement PowerShell concepts and applications © 2015 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.

Introduction to PowerShell

Office 365 components

Connect to Office 365 requirements To work with Office365 subscription:  Install the Microsoft Online Services Sign In Assistant (it says it's a Beta, but is not)  Download and Install the Windows Azure Active Directory PowerShell Module (X86 or X64)  To work with Exchange Online:  (optional) If planning to interact with EWS, Download and Install the EWS API    To work with Sharepoint Online:  Download and install the SharePoint Online PowerShell Module  To work with Skype Online:  Download and Install the Skype Online PowerShell Module To find cmdlets use the cmdlet Get-Command. Various parameters make the search for certain cmdlets easier.

Connecting to Services · Online Services $userCredential = Get-Credential -UserName user@yourdomain.onmicrosoft.com -Message "Hello master!!" Connecting to Services · Online Services Connect-MsolService –Credential $userCredential Connecting to Services · Exchange Online $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $userCredential -Authentication Basic -AllowRedirection Import-PSSession $Session

Connecting to Services · Sharepoint Online Import-Module Microsoft.Online.SharePoint.PowerShell Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential admin@contoso.com Connecting to Services · Skype for Business Online Import-Module LyncOnlineConnector $lyncSession = New-CsOnlineSession -Credential $userCredential Import-PSSession $lyncSession Connecting to Services · Security & Compliance Center $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $userCredential -Authentication Basic –AllowRedirection Import-PSSession $Session

Automate your login Notepad $profile Write-Host “To connect to O365 type ‘Connect-O365'” Write-Host “To connect to Exchange-Online ‘Connect-ExO'” Write-Host “To connect to Sharepoint Online type ‘Connect-SharepointOnline'” Write-Host “To connect to Skype Online type ‘Connect-SkypeOnline'” Write-Host “To connect to Security And Compliance Online type ‘Connect-SecAndCompliance'” Write-Host Function Connect-O365{ $userCredential = Get-Credential -UserName madalina@thedutchess.onmicrosoft.com -Message "Hello master!!" Connect-MsolService –Credential $userCredential } Function Connect-ExO{ $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $userCredential -Authentication Basic -AllowRedirection Import-PSSession $Session

Automate your login Function Connect-SharepointOnline{ $userCredential = Get-Credential -UserName madalina@thedutchess.onmicrosoft.com -Message "Hello master!!" Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential admin@contoso.com } Function Connect-SkypeOnline{ Import-Module LyncOnlineConnector $lyncSession = New-CsOnlineSession -Credential $userCredential Import-PSSession $lyncSession Function Connect-SecAndCompliance{ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $userCredential -Authentication Basic –AllowRedirection Import-PSSession $Session

Execution Policy

Execution Policies Restricted Remote Signed All Signed Unrestricted Scripts cannot be run PowerShell Interactive only Default Setting Restricted Runs all local scripts Scripts downloaded from IE, Outlook Express and Messenger must be signed by a trusted source Remote Signed Runs a script only if signed Signature must be trusted on local machine All Signed All scripts from all sources can be run without signing Prompts for scripts coming from the internet Unrestricted Nothing is blocked and there are no warnings or prompts Bypass Removes the currently assigned execution policy from the current scope Undefined Windows PowerShell execution policies let you determine the conditions under which Windows PowerShell loads configuration files and runs scripts.   You can set an execution policy for the local computer, for the current user, or for a particular session. You can also use a Group Policy setting to set execution policy for computers and users. Execution policies for the local computer and current user are stored in the registry. You do not need to set execution policies in your Windows PowerShell profile. The execution policy for a particular session is stored only in memory and is lost when the session is closed. The execution policy is not a security system that restricts user actions. For example, users can easily circumvent a policy by typing the script contents at the command line when they cannot run a script. Instead, the execution policy helps users to set basic rules and prevents them from violating them unintentionally. WINDOWS POWERSHELL EXECUTION POLICIES The Windows PowerShell execution policies are as follows: "Restricted" is the default policy. Restricted Default execution policy in Windows 8, Windows Server 2012, and Windows 8.1. Permits individual commands, but will not run scripts. Prevents running of all script files, including formatting and configuration files (.ps1xml), module script files (.psm1), and Windows PowerShell profiles (.ps1). AllSigned Scripts can run. Requires that all scripts and configuration files be signed by a trusted publisher, including scripts that you write on the local computer. Prompts you before running scripts from publishers that you have not yet classified as trusted or untrusted. Risks running si gned, but malicious, scripts. RemoteSigned Scripts can run. This is the default execution policy in Windows Server 2012 R2. Requires a digital signature from a trusted publisher on scripts and configuration files that are downloaded from the Internet (including e-mail and instant messaging programs). Does not require digital signatures on scripts that you have written on the local computer (not downloaded from the Internet). Runs scripts that are downloaded from the Internet and not signed, if the scripts are unblocked, such as by using the Unblock-File cmdlet. Risks running unsigned scripts from sources other than the Internet and signed, but malicious, scripts. Unrestricted Unsigned scripts can run. (This risks running malicious scripts.) Warns the user before running scripts and configuration files that are downloaded from the Internet. Bypass Nothing is blocked and there are no warnings or prompts. This execution policy is designed for configurations in which a Windows PowerShell script is built in to a larger application or for configurations in which Windows PowerShell is the foundation for a program that has its own security model. Undefined There is no execution policy set in the current scope. If the execution policy in all scopes is Undefined, the effective execution policy is Restricted, which is the default execution policy. Note: On systems that do not distinguish Universal Naming Convention (UNC) paths from Internet paths, scripts that are identified by a UNC path might not be permitted to run with the RemoteSigned execution policy.

cmdLet Reference Azure Active Directory Exchange Online https://msdn.microsoft.com/en-us/library/jj151815.aspx?f=255&MSPPError=-2147217396 Exchange Online https://technet.microsoft.com/en-us/library/jj200780(v=exchg.160).aspx SharePoint Online https://technet.microsoft.com/en-us/library/fp161364.aspx Skype Online https://technet.microsoft.com/en-us/library/mt228132.aspx Office 365 Security & Compliance Center https://technet.microsoft.com/en-us/library/mt587093(v=exchg.160).aspx

Office 365 throttling How to survive to the limits: Exchange Online throttling and Limit FAQ https://blogs.msdn.microsoft.com/exchangedev/2011/06/23/exchange-online-throttling-and-limits-faq/ How to: Avoid getting throttled or blocked in SharePoint Online https://msdn.microsoft.com/en-us/library/office/dn889829.aspx How to survive to the limits: Running PowerShell cmdlets for large numbers of users in Office 365 https://blogs.technet.microsoft.com/exchange/2015/11/02/running-powershell-cmdlets-for-large-numbers-of-users-in-office-365/

Pipeline How does the pipeline work Cmdlets for controlling the pipeline Sort-Object Where-Object ForEach-Object Select-Object Group-Object Measure-Object Tee-Object Compare-Object Join-Object (non-standard) Split-Pipeline (non-standard)

5/1/2018 Q&A © 2015 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.

5/1/2018 © 2016 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. © 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.