Office 365/ Exchange Online Notes
Connect to
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session
Send on Behalf of
Set-Mailbox [email protected] -GrantSendOnBehalfTo [email protected]
Allow Comments in calendar
Set-CalendarProcessing -Identity Meetingroom -AddOrganizerToSubject $true -DeleteComments $false -DeleteSubject $false
Allow Conflicts in room Calendar
Set-CalendarProcessing -Identity “[email protected]” -AllowConflicts $true
change mailbox permission
Add-MailboxPermission -identity [email protected] -user [email protected] -AccessRights FullAccess
Hide user from Gal
Set-Mailbox -Identity <[email protected]> -HiddenFromAddressListsEnabled $true
Show last login date/time
Get-mailbox -resultsize unlimited| Get-MailboxStatistics | select displayname, lastlogontime
Add permission to calendar
Add-MailboxFolderPermission -Identity “userA:\Calendar” -AccessRights PublishingEditor -User UserB
User Photos
from http://technet.microsoft.com/en-us/library/jj218694(v=exchg.150).aspx
This example uploads a preview photo to Ann Beebe’s user account.
Set-UserPhoto "Ann Beebe" -PictureData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\AnnBeebe.jpg"))
To save the preview photo that was uploaded using the previous command, run the following command.
Set-UserPhoto "Ann Beebe" -Save
To delete the preview photo that was uploaded using the first command in this example, run the following command.
Set-UserPhoto “Ann Beebe” -Cancel
Powershell change users info in bulk
get all users info
get-user | FL * > c:\intel\allusers1.csv
create a file in the format
login_name company phone fax
wills contenso 01234 567890 01234 567 899
save the file and save it in this case called phonenumbers.csv run the following commands in powershell $user_file = Import-CSV 'C:\Users\shane_000\Desktop\phonenumbers.csv'
$user_file | ForEach {Set-user $_.login_name -Company $_.company -Phone $_.Phone -Fax $_.Fax} get-MsolUser -UserPrincipalName [email protected] |fl Set-MsolUser [email protected] -ImmutableId "$null"
Set-Clutter -Identity [email protected] -Enable $false Turns off clutter for one user