Presentation is loading. Please wait.

Presentation is loading. Please wait.

Office PowerShell administration

Similar presentations


Presentation on theme: "Office PowerShell administration"— Presentation transcript:

1 Office 365 - PowerShell administration
5/1/2018 Office 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.

2 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.

3 Introduction to PowerShell

4 Office 365 components

5 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.

6 Connecting to Services · Online Services
$userCredential = Get-Credential -UserName -Message "Hello master!!" Connecting to Services · Online Services Connect-MsolService –Credential $userCredential Connecting to Services · Exchange Online $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $userCredential -Authentication Basic -AllowRedirection Import-PSSession $Session

7 Connecting to Services · Sharepoint Online
Import-Module Microsoft.Online.SharePoint.PowerShell Connect-SPOService -Url -credential 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 -Credential $userCredential -Authentication Basic –AllowRedirection Import-PSSession $Session

8 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 -Message "Hello master!!" Connect-MsolService –Credential $userCredential } Function Connect-ExO{ $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $userCredential -Authentication Basic -AllowRedirection Import-PSSession $Session

9 Automate your login Function Connect-SharepointOnline{
$userCredential = Get-Credential -UserName -Message "Hello master!!" Connect-SPOService -Url -credential } Function Connect-SkypeOnline{ Import-Module LyncOnlineConnector $lyncSession = New-CsOnlineSession -Credential $userCredential Import-PSSession $lyncSession Function Connect-SecAndCompliance{ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $userCredential -Authentication Basic –AllowRedirection Import-PSSession $Session

10 Execution Policy

11 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 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.

12 cmdLet Reference Azure Active Directory Exchange Online
Exchange Online SharePoint Online Skype Online Office 365 Security & Compliance Center

13 Office 365 throttling How to survive to the limits:
Exchange Online throttling and Limit FAQ How to: Avoid getting throttled or blocked in SharePoint Online How to survive to the limits: Running PowerShell cmdlets for large numbers of users in Office 365

14 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)

15 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.

16 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.


Download ppt "Office PowerShell administration"

Similar presentations


Ads by Google