{"id":16,"date":"2012-11-05T11:11:59","date_gmt":"2012-11-05T11:11:59","guid":{"rendered":"http:\/\/www.bartons.org.uk\/?page_id=16"},"modified":"2012-11-05T11:11:59","modified_gmt":"2012-11-05T11:11:59","slug":"exchange-online","status":"publish","type":"page","link":"https:\/\/www.bartons.org.uk\/?page_id=16","title":{"rendered":"Exchange online \/ office365"},"content":{"rendered":"<p><strong>Office 365\/ Exchange Online Notes<\/strong><\/p>\n<p><strong>Connect to<\/strong><\/p>\n<p>$LiveCred = Get-Credential<\/p>\n<p>$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri <a href=\"https:\/\/ps.outlook.com\/powershell\/\">https:\/\/ps.outlook.com\/powershell\/<\/a> -Credential $LiveCred -Authentication Basic -AllowRedirection<\/p>\n<p>Import-PSSession $Session<\/p>\n<p><strong>Send on Behalf of<\/strong><\/p>\n<p>Set-Mailbox <a href=\"mailto:xxxxxx.xxxxxx@forestholidays.co.uk\">xxxxxx.xxxxxx@forestxxxxxxxx.co.uk<\/a> -GrantSendOnBehalfTo <a href=\"mailto:xx.xxxxx@forestholidays.co.uk\">xx.xxxxx@forestxxxxxxxx.co.uk<\/a><\/p>\n<p><strong>Allow Comments in calendar<\/strong><\/p>\n<p>Set-CalendarProcessing -Identity Meetingroom -AddOrganizerToSubject $true -DeleteComments $false -DeleteSubject $false<\/p>\n<p><strong>Allow Conflicts in room Calendar<\/strong><\/p>\n<p><strong> Set-CalendarProcessing -Identity &#8220;<a href=\"mailto:mps.fod@forestholidays.co.uk\">mps.fod@xxxxxxxxxx.co.uk<\/a>&#8221; -AllowConflicts $true<\/strong><\/p>\n<p><strong>change mailbox permission<\/strong><\/p>\n<p><tt>Add-MailboxPermission -identity UserA@domain.com -user UserB@domain.com -AccessRights FullAccess<\/tt><\/p>\n<p><strong>Hide user from Gal<\/strong><\/p>\n<p>Set-Mailbox -Identity &lt;Object@contoso.com&gt; -HiddenFromAddressListsEnabled $true<\/p>\n<p><strong>Show last login date\/time<\/strong><\/p>\n<p>Get-mailbox -resultsize unlimited| Get-MailboxStatistics | select displayname, lastlogontime<\/p>\n<p><strong>\u00a0Add permission to\u00a0calendar<\/strong><\/p>\n<p>Add-MailboxFolderPermission -Identity \u201cuserA:\\Calendar\u201d -AccessRights PublishingEditor -User UserB<\/p>\n<p><strong>User Photos<\/strong><\/p>\n<p>from\u00a0<a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/jj218694(v=exchg.150).aspx\">http:\/\/technet.microsoft.com\/en-us\/library\/jj218694(v=exchg.150).aspx<\/a><\/p>\n<p>This example uploads a preview photo to Ann Beebe&#8217;s user account.<\/p>\n<div id=\"code-snippet-6\">\n<div><\/div>\n<div>\n<div><\/div>\n<div id=\"CodeSnippetContainerCode_b7bcbe48-ecfd-4904-a86b-2be29db5944d\" dir=\"ltr\">\n<div>\n<pre>Set-UserPhoto \"Ann Beebe\" -PictureData ([System.IO.File]::ReadAllBytes(\"C:\\Users\\Administrator\\Desktop\\AnnBeebe.jpg\"))<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>To save the preview photo that was uploaded using the previous command, run the following command.<\/p>\n<div id=\"code-snippet-7\">\n<div>\n<div id=\"CodeSnippetContainerCode_21961307-d0f9-4951-ad23-dc4be7414d9a\" dir=\"ltr\">\n<div>\n<pre>Set-UserPhoto \"Ann Beebe\" -Save<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>To delete the preview photo that was uploaded using the first command in this example, run the following command.<\/p>\n<div id=\"code-snippet-8\">\n<div>\n<div id=\"CodeSnippetContainerCode_5cabb113-29a8-464b-a7a0-f00d36ffe8fb\" dir=\"ltr\">\n<div>\n<p>Set-UserPhoto &#8220;Ann Beebe&#8221; -Cancel<\/p>\n<p><strong>Powershell change users info in bulk <\/strong><br \/>\nget all users info<\/p>\n<p>get-user\u00a0 | FL * &gt; c:\\intel\\allusers1.csv<\/p>\n<p>create a file in the format<\/p>\n<p>login_name company\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 phone\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 fax<br \/>\nwills\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 contenso 01234 567890\u00a0 01234 567 899<\/p>\n<pre><\/pre>\n<pre>save the file and save it in this case called phonenumbers.csv\nrun the following commands in powershell\n\n$user_file = Import-CSV 'C:\\Users\\shane_000\\Desktop\\phonenumbers.csv'\n<\/pre>\n<pre>$user_file | ForEach {Set-user $_.login_name -Company $_.company -Phone $_.Phone -Fax $_.Fax}\n\n\nget-MsolUser -UserPrincipalName xxx@xxx.co.uk |fl\nSet-MsolUser -UserPrincipalNamexxx@yyy.co.uk -ImmutableId \"$null\"\n\n\n\n\n<\/pre>\n<pre class=\"powershell\">Set-Clutter -Identity user@domain.com -Enable $false\nTurns off clutter for one user<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>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 xxxxxx.xxxxxx@forestxxxxxxxx.co.uk -GrantSendOnBehalfTo xx.xxxxx@forestxxxxxxxx.co.uk Allow Comments in calendar Set-CalendarProcessing -Identity Meetingroom -AddOrganizerToSubject $true -DeleteComments $false -DeleteSubject $false Allow Conflicts in room Calendar Set-CalendarProcessing -Identity &#8220;mps.fod@xxxxxxxxxx.co.uk&#8221; -AllowConflicts $true [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":70,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-16","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.bartons.org.uk\/index.php?rest_route=\/wp\/v2\/pages\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bartons.org.uk\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bartons.org.uk\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bartons.org.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bartons.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16"}],"version-history":[{"count":0,"href":"https:\/\/www.bartons.org.uk\/index.php?rest_route=\/wp\/v2\/pages\/16\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.bartons.org.uk\/index.php?rest_route=\/wp\/v2\/pages\/70"}],"wp:attachment":[{"href":"https:\/\/www.bartons.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}