{"id":189,"date":"2021-09-01T14:47:28","date_gmt":"2021-09-01T11:47:28","guid":{"rendered":"https:\/\/tech.zeleneew.ru\/?p=189"},"modified":"2021-09-01T19:44:48","modified_gmt":"2021-09-01T16:44:48","slug":"%d0%bf%d0%be%d0%b4%d0%ba%d0%bb%d1%8e%d1%87%d0%b5%d0%bd%d0%b8%d0%b5-%d0%ba-office-365-%d1%81-%d0%bf%d0%be%d0%bc%d0%be%d1%89%d1%8c%d1%8e-powershell","status":"publish","type":"post","link":"https:\/\/tech.zeleneew.ru\/?p=189","title":{"rendered":"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a Office 365 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell"},"content":{"rendered":"\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c PowerShell Online Services \u0434\u043b\u044f Microsoft Azure Active Directory \u0438 Office 365, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 PowerShell: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Install-Module -Name AzureAD<\/code>\n<code>Install-Module -Name MSOnline<\/code><\/pre>\n\n\n\n<p>\u0412\u0432\u0435\u0441\u0442\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c Office 365: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>$Cred = Get-Credential<\/code><\/pre>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u0430\u043d\u0441 PowerShell \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>$O365 = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/outlook.office365.com\/powershell-liveid\/ -Credential $Cred -Authentication Basic -AllowRedirection<\/code><\/pre>\n\n\n\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u0435\u0430\u043d\u0441\u0430 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0430\u043d\u0441 Windows PowerShell:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Import-PSSession <code> <code>$O365<\/code><\/code><\/code><\/pre>\n\n\n\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0435\u0430\u043d\u0441 \u043a\u043e \u0432\u0441\u0435\u043c \u0441\u0432\u043e\u0438\u043c \u0441\u043b\u0443\u0436\u0431\u0430\u043c Office 365:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Connect-MsolService \u2013Credential <code>$Cred<\/code> <\/code> <\/pre>\n\n\n\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Get-Command<\/pre>\n\n\n\n<p>\u042d\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442 PowerShell \u0434\u043b\u044f Office 365 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c PowerShell Online Services \u0434\u043b\u044f Microsoft Azure Active Directory \u0438 Office 365, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 PowerShell: Install-Module -Name AzureAD Install-Module -Name MSOnline \u0412\u0432\u0435\u0441\u0442\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c Office 365: $Cred = Get-Credential \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u0430\u043d\u0441 PowerShell &hellip; <a href=\"https:\/\/tech.zeleneew.ru\/?p=189\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-189","post","type-post","status-publish","format-standard","hentry","category--ms"],"_links":{"self":[{"href":"https:\/\/tech.zeleneew.ru\/index.php?rest_route=\/wp\/v2\/posts\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech.zeleneew.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.zeleneew.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.zeleneew.ru\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.zeleneew.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=189"}],"version-history":[{"count":5,"href":"https:\/\/tech.zeleneew.ru\/index.php?rest_route=\/wp\/v2\/posts\/189\/revisions"}],"predecessor-version":[{"id":199,"href":"https:\/\/tech.zeleneew.ru\/index.php?rest_route=\/wp\/v2\/posts\/189\/revisions\/199"}],"wp:attachment":[{"href":"https:\/\/tech.zeleneew.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.zeleneew.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.zeleneew.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}