How to gain access to office 365 via powershell

How to gain access to office 365 via powershell

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS C:\Users\soonkok.goh> set-executionpolicy unrestricted

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic. Do you want to change the execution
policy?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
PS C:\Users\soonkok.goh> $LiveCred = Get-Credential

cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
PS C:\Users\soonkok.goh> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outloo
k.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
WARNING: Your connection has been redirected to the following URI:
"https://pod51022psh.outlook.com/PowerShell-LiveID?PSVersion=2.0 "
WARNING: Your connection has been redirected to the following URI:
"https://hkxprd0410psh.outlook.com/PowerShell-LiveID?PSVersion=2.0 "
PS C:\Users\soonkok.goh> Import-PSSession $Session

ModuleType Name                      ExportedCommands
---------- ----                      ----------------
Script     tmp_4901148a-5804-4b7b... {Set-RoleGroup, Set-RMSTrustedPublishingDomain, Disable-UMAutoAttendant,...


PS C:\Users\soonkok.goh> Get-RecipientPermission -Identity catherine.yam@les-affaires.com | select trustee,accesscontrol
type,accessrights

Trustee                                 AccessControlType                       AccessRights
-------                                 -----------------                       ------------
NT AUTHORITY\SELF                       Allow                                   {SendAs}


PS C:\Users\soonkok.goh> Get-Mailbox -Identity catherine.yam |sekect grantsendonbehalfto
Leave a Comment
  • Please add 1 and 6 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
Page 1 of 1 (1 items)