Powershell to get SharePoint group by ID

Powershell to get SharePoint group by ID

2019/04/26 Office 365 SharePoint 0
function Get-SPGroup($web, $id){
	$SPSite = Get-SPSite $web
	foreach($SPWeb in $SPWebCollection){
		foreach($SPGroup in $SPWeb.Groups){
			if ($SPGroup.ID -eq $id){
				$SPGroup
			}
		}
	}
}

Usage: Get-SPGroup https://cf.peter.com 705


read count : 10

Leave a Reply

Your email address will not be published. Required fields are marked *