{"id":2026,"date":"2012-07-05T14:22:11","date_gmt":"2012-07-05T11:22:11","guid":{"rendered":"http:\/\/www.buldakov.ru\/?p=2026"},"modified":"2012-07-05T14:22:11","modified_gmt":"2012-07-05T11:22:11","slug":"%d1%81%d0%be%d0%b1%d0%b8%d1%80%d0%b0%d0%b5%d0%bc-%d0%b3%d1%80%d1%83%d0%bf%d0%bf%d1%8b-%d1%80%d0%b0%d1%81%d1%81%d1%8b%d0%bb%d0%be%d0%ba-%d0%bf%d0%be%d0%bb%d1%8c%d0%b7%d0%be%d0%b2%d0%b0%d1%82%d0%b5","status":"publish","type":"post","link":"https:\/\/www.buldakov.ru\/?p=2026","title":{"rendered":"\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u044b \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f"},"content":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 &#8211; \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Exchange 2010\u00a0\u0441 \u043b\u043e\u0433\u0438\u043d\u0430\u043c\u0438 \u0438 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u0442. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">&quot;User Name1&quot;, &quot;UserLogon1&quot;, &quot;DistrGroup1;DistrGroup2;DistrGroup3;&quot;\n&quot;User Name2&quot;, &quot;UserLogon2&quot;, &quot;DistrGroup3;DistrGroup4;DistrGroup5;&quot;\n....<\/pre>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 2 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0447\u0435\u0440\u0435\u0437<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">Get-Mailbox -Server\u00a0ServerName -ResultSize unlimited | select DisplayName,\nSamAccountName<\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Exchange \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a \u0433\u0440\u0443\u043f\u043f\u0430\u043c, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0443\u0447\u0451\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c. \u0417\u0430\u0442\u043e \u0432 AD \u0443 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e MemberOf:<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">(Get-ADUser UserName -Properties MemberOf).MemberOf<\/pre>\n<p>\u041a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f <a title=\"Distinguished Names\" href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/aa366101(v=vs.85).aspx\" target=\"_blank\">Distinguished Name<\/a> \u0433\u0440\u0443\u043f\u043f, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442. \u041e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u0438 \u0433\u0440\u0443\u043f\u043f\u044b \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0443\u043f\u043f\u044b \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <a title=\"SAM-Account-Type attribute\" href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms679637(v=vs.85).aspx\" target=\"_blank\">sAMAccountType<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a (SAM_NON_SECURITY_GROUP_OBJECT)\u00a0\u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d 268435457. \u0414\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0433\u0440\u0443\u043f\u043f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">$Groups = (Get-ADUser UserName -Properties MemberOf).MemberOf\n$GroupsString = &quot;&quot;\nforeach ($Group in $Groups){\n   $GroupObject = &#x5B;ADSI]&quot;LDAP:\/\/$Group&quot;\n   if ($GroupObject.sAMAccountType -eq '268435457') {\n      $GroupsString = $GroupsString + $GroupObject.name + &quot;; &quot;}}<\/pre>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">Get-Mailbox -Server\u00a0ServerName -ResultSize unlimited | select DisplayName,\nSamAccountName,\u00a0@{Name=&quot;Distribution Groups&quot;;expression={\n$Groups = (Get-ADUser $_.SamAccountName -Properties MemberOf).MemberOf\n$GroupsString = &quot;&quot;\n   foreach ($Group in $Groups){\n      $GroupObject = &#x5B;ADSI]&quot;LDAP:\/\/$Group&quot;\n      if ($GroupObject.sAMAccountType -eq '268435457') {\n         $GroupsString = $GroupsString + $GroupObject.name + &quot;; &quot;}}\n   $GroupsString}} | Export-Csv c:Tempusers.csv<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 &#8211; \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Exchange 2010\u00a0\u0441 \u043b\u043e\u0433\u0438\u043d\u0430\u043c\u0438 \u0438 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u0442. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430: &quot;User Name1&quot;, &quot;UserLogon1&quot;, &quot;DistrGroup1;DistrGroup2;DistrGroup3;&quot; &quot;User Name2&quot;, &quot;UserLogon2&quot;, &quot;DistrGroup3;DistrGroup4;DistrGroup5;&quot; &#8230;. \u041f\u0435\u0440\u0432\u044b\u0435 2 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0447\u0435\u0440\u0435\u0437 Get-Mailbox -Server\u00a0ServerName -ResultSize unlimited | select DisplayName, SamAccountName \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Exchange \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,11],"tags":[],"class_list":["post-2026","post","type-post","status-publish","format-standard","hentry","category-powershell","category-life"],"_links":{"self":[{"href":"https:\/\/www.buldakov.ru\/index.php?rest_route=\/wp\/v2\/posts\/2026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.buldakov.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.buldakov.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.buldakov.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.buldakov.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2026"}],"version-history":[{"count":0,"href":"https:\/\/www.buldakov.ru\/index.php?rest_route=\/wp\/v2\/posts\/2026\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.buldakov.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.buldakov.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.buldakov.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}