如何使用PowerShell從Azure Active Directory中導出group的member?

最近收到user需求,要導出Yammer group的member。那麼如何通過PowerShell導出Azure AD中Group的member呢?

可以通過下面步驟實現:

1. 使用Administrator打開SharePoint Online Management Shell;

2. 輸入“Connect-MsolService”連接Azure Active Directory;

3. 在彈出的窗口中輸入Azure Administrator的用戶名密碼;

4. 登錄https://portal.azure.com -> Group,輸入group name進行search,找到group後點擊查看group details,copy group的object id;

5. 在PowerShell中輸入下面命令導出group member;

Get-MsolGroupMember -GroupObjectID "xxxxx" | export-csv "d:\GroupMemberList.csv"

6. 執行完成後,到設置的路徑下找到的csv,打開顯示member信息如下。

感謝閱讀。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章