{"id":25,"date":"2024-11-14T17:03:54","date_gmt":"2024-11-14T08:03:54","guid":{"rendered":"https:\/\/itnews.jp\/?p=25"},"modified":"2024-11-16T20:40:36","modified_gmt":"2024-11-16T11:40:36","slug":"microsoft365-powershell%e5%88%9d%e5%9b%9e%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3","status":"publish","type":"post","link":"https:\/\/itnews.jp\/?p=25","title":{"rendered":"Microsoft365 PowerShell\u521d\u56de\u30ed\u30b0\u30a4\u30f3"},"content":{"rendered":"\n<p>\u25a0<a href=\"https:\/\/learn.microsoft.com\/ja-jp\/powershell\/exchange\/exchange-online-powershell-v2?view=exchange-ps#install-and-maintain-the-exchange-online-powershell-module\" target=\"_blank\" rel=\"noreferrer noopener\">\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb(Microsoft)<\/a><br>\u25c9\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f<a href=\"https:\/\/learn.microsoft.com\/ja-jp\/powershell\/exchange\/exchange-online-powershell-v2?view=exchange-ps#install-and-maintain-the-exchange-online-powershell-module\" target=\"_blank\" rel=\"noreferrer noopener\">\u3053\u3053\u3089<\/a>\u8fba<br>\u25c9\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u5834\u5408\u306f\u3001PowerShell\u3092\u7ba1\u7406\u8005\u3068\u3057\u3066\u958b\u3044\u3066\u3001net start WinRM \u30b3\u30de\u30f3\u30c9\u3067\u3001<br>\u3000WinRM(Windows \u30ea\u30e2\u30fc\u30c8\u7ba1\u7406) \u30b5\u30fc\u30d3\u30b9\u304c\u958b\u59cb\u3055\u308c\u3066\u3044\u308b\u304b\u3001\u78ba\u8a8d\u3057\u3066\u307f\u3088\u3046\uff01<br>\u25c9WinRM\u30cd\u30bf\u3068\u3057\u3066\u3001<a href=\"https:\/\/learn.microsoft.com\/ja-jp\/powershell\/exchange\/exchange-online-powershell-v2?view=exchange-ps#turn-on-basic-authentication-in-winrm\" target=\"_blank\" rel=\"noreferrer noopener\">\u3053\u3053\u3089<\/a>\u8fba\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3001\u521d\u671f\u8a2d\u5b9a\u3092\u8a66\u3057\u3066\u307f\u3088\u3046\u3002<br><\/p>\n\n\n\n<p>\u25a0<a href=\"https:\/\/learn.microsoft.com\/ja-jp\/powershell\/exchange\/connect-to-exchange-online-powershell?view=exchange-ps&amp;preserve-view=true\" target=\"_blank\" rel=\"noreferrer noopener\">Exchange Online PowerShell \u306b\u63a5\u7d9a\u3059\u308b(Microsoft)<\/a><br>\u25c9Exchange Online\u63a5\u7d9a\u7528\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br>Import-Module ExchangeOnlineManagement<br><br>\u25c9Exchange Online\u306b\u63a5\u7d9a<br>Connect-ExchangeOnline -UserPrincipalName xxx@xxx.xxx<\/p>\n\n\n\n<p>\u25c9Exchange Online\u3092\u5207\u65ad<br>Disconnect-ExchangeOnline<\/p>\n\n\n\n<p>\u25a0\u3046\u307e\u304f\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u304b\u3001\u52d5\u4f5c\u78ba\u8a8d\u30b3\u30de\u30f3\u30c9\u4f8b<br>\u25c9Office365\u30c6\u30ca\u30f3\u30c8\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u30c9\u30e1\u30a4\u30f3\u4e00\u89a7\u3092\u8868\u793a<br>Get-AcceptedDomain<\/p>\n\n\n\n<p>\u25c9\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u30a2\u30c9\u30ec\u30b9\u4e00\u89a7<br>Get-Mailbox -Identity *<br>\u7c73\u3060\u3068\u5168\u90e8\u8868\u793a\u3055\u308c\u3066\u5206\u304b\u308a\u306b\u304f\u3044\u306e\u3067\u3001\u30d4\u30f3\u30dd\u30a4\u30f3\u30c8\u3067\u81ea\u5206\u81ea\u8eab\u3092\u898b\u305f\u308a\u2026<br>Get-Mailbox -Identity Email\u30a2\u30c9\u30ec\u30b9 | format-list<\/p>\n\n\n\n<p>\u25a0<a href=\"https:\/\/learn.microsoft.com\/ja-jp\/microsoftteams\/rooms\/create-resource-account?tabs=m365-admin-center%2Cgraph-powershell-password\" target=\"_blank\" rel=\"noreferrer noopener\">Teams Rooms\u65bd\u8a2d\u306b\u95a2\u3059\u308b\u8af8\u8a2d\u5b9a(Microsoft)<\/a><br>\u25c9\u65bd\u8a2d\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u7121\u671f\u9650\u5316<br>\u25bcMicrosoft Graph PowerShell\u306b\u63a5\u7d9a<br>Connect-MgGraph -Scopes &#8220;User.ReadWrite.All&#8221;<br><br>\u25bc\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u7121\u671f\u9650\u5316<br>Update-MgUser -UserId xxx@xxx.com -PasswordPolicies DisablePasswordExpiration<br><br>\u25bc\u7121\u671f\u9650\u5316\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u78ba\u8a8d<br>Get-MGuser -UserId&nbsp;xxx@xxx.xxx&nbsp;-Property UserPrincipalName, PasswordPolicies | Select-Object UserPrincipalName,@{N=&#8221;PasswordNeverExpires&#8221;;E={$_.PasswordPolicies -contains &#8220;DisablePasswordExpiration&#8221;}}<br><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u25a0\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb(Microsoft)\u25c9\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3053\u3053\u3089\u8fba\u25c9\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u5834\u5408\u306f\u3001PowerShell\u3092\u7ba1\u7406\u8005\u3068\u3057\u3066\u958b\u3044\u3066\u3001net start WinRM \u30b3\u30de\u30f3\u30c9\u3067\u3001\u3000WinRM(Windows \u30ea\u30e2\u30fc\u30c8\u2026 <span class=\"read-more\"><a href=\"https:\/\/itnews.jp\/?p=25\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":56,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-25","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"_links":{"self":[{"href":"https:\/\/itnews.jp\/index.php?rest_route=\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itnews.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itnews.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itnews.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itnews.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=25"}],"version-history":[{"count":5,"href":"https:\/\/itnews.jp\/index.php?rest_route=\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/itnews.jp\/index.php?rest_route=\/wp\/v2\/posts\/25\/revisions\/31"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itnews.jp\/index.php?rest_route=\/wp\/v2\/media\/56"}],"wp:attachment":[{"href":"https:\/\/itnews.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itnews.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itnews.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}