문제

I am working on PowerShell script where I have to get the all the O365 groups using PowerShell with minimal permission.

Please share the supporting articles to get the O365 groups and permission required

도움이 되었습니까?

해결책

You could use the Get-UnifiedGroup cmdlet to view Microsoft 365 Groups.

Reference:

https://docs.microsoft.com/en-us/powershell/module/exchange/get-unifiedgroup?view=exchange-ps

다른 팁

To add to the answer above here is an example of a script using Get-UnifiedGroup

#Get Credentials to connect
$Credential = Get-Credential
  
#Create the session
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ `
           -Credential $Credential -Authentication Basic -AllowRedirection
  
#Import the session
Import-PSSession $Session -DisableNameChecking
 
#Get all Office 365 Group
Get-UnifiedGroup
 
#Remove the session
Remove-PSSession $Session

I am unsure of what permissions are needed however.

https://www.sharepointdiary.com/ is a great resource for all things SharePoint and PowerShell related

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top