Skip to content

Instantly share code, notes, and snippets.

@matzeeable matzeeable/role.ps1
Last active Feb 22, 2019

Embed
What would you like to do?
matthias-web.com: Jira SITO > Documentation for Administrators
# Enable custom organization so the Role can be added via CLI (this is usually enabled in your company)
Enable-OrganizationCustomization
# Replace user@example.com with the Exchange user you have used in "Exchange Configuration"
New-ManagementRoleAssignment -User:user@example.com -name:impersonationAssignmentName -Role:ApplicationImpersonation
# Office365-only: Close the session
Remove-PSSession $Session
# Allow remote scripts (downloaded from Office365)
Set-ExecutionPolicy RemoteSigned
# Create credentials for your Office365 user (the same as in "Exchange Configuration")
$UserCredential = Get-Credential
# Create the session
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
# Connect to the session
Import-PSSession $Session -DisableNameChecking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.