{"id":334,"date":"2016-12-19T09:01:21","date_gmt":"2016-12-19T07:01:21","guid":{"rendered":"http:\/\/itsimple.info\/?p=334"},"modified":"2016-12-19T09:01:21","modified_gmt":"2016-12-19T07:01:21","slug":"how-to-connect-to-office-365-with-powershell","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=334","title":{"rendered":"how to connect to office 365 with powershell"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>First You need to install the Microsoft.NET Framework 4.5 or later and then either the Windows Management Framework 3.0 or the Windows Management Framework 4.0. For more information, see <a href=\"http:\/\/go.microsoft.com\/fwlink\/p\/?LinkId=257868\">Installing the .NET Framework<\/a> and <a href=\"http:\/\/go.microsoft.com\/fwlink\/p\/?LinkId=272757\">Windows Management Framework 3.0<\/a> or <a href=\"http:\/\/go.microsoft.com\/fwlink\/p\/?LinkId=391344\">Windows Management Framework 4.0<\/a>.<\/p>\n<p>You need to allow execution of script in Powershell<\/p>\n<pre>Set-ExecutionPolicy RemoteSigned<\/pre>\n<p><strong><u>run this line to get connected for basic connection :<\/u><\/strong><\/p>\n<pre>$UserCredential = Get-Credential\r\n$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/outlook.office365.com\/powershell-liveid\/ -Credential $UserCredential -Authentication Basic -AllowRedirection\r\nImport-PSSession $Session<\/pre>\n<p>&nbsp;<\/p>\n<p><strong><u>To Disconnect :<\/u><\/strong><\/p>\n<pre>Remove-PSSession $Session<\/pre>\n<hr \/>\n<p>Good Luck<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; First You need to install the Microsoft.NET Framework 4.5 or later and then either the Windows Management Framework 3.0 or the Windows Management Framework 4.0. For more information, see Installing the .NET Framework and Windows Management Framework 3.0 or Windows Management Framework 4.0. You need to allow execution of script in Powershell Set-ExecutionPolicy RemoteSigned [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-334","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=334"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/334\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}