The Set-MsolGroup cmdlet in PowerShell updates a security group in Microsoft Office 365. This command updates the properties of the group.
The syntax to update the properties of the security group in Azure Active Directory is given below.
Set-MsolGroup
[-ObjectId <Guid>]
[-DisplayName <String>]
[-Description <String>]
[-ManagedBy <String>]
[-TenantId <Guid>]
[<CommonParameters>]
In this article, we will discuss how to use the Set-MsolGroup cmdlet in PowerShell to update the properties of the group such as description.
How to Modify the Description of the Group in Office 365
To modify the description of the group in Office 365, use the Set-MsolGroup cmdlet in PowerShell with the -Description
and the -ObjectId
parameters.
The -Description
parameter specifies the display name of the group that you want to update and the -ObjectId
parameter specifies a unique ID of the group that you want to retrieve for update.
# Get the group $GroupId = Get-MsolGroup -SearchString "LabView" # Update the description of the group Set-MsolGroup -ObjectId $Group.ObjectId -Description "ShellGeek Labview Group"
The Get-MsolGroup cmdlet in PowerShell retrieves the security group that matches the string “LabView” and stores it in the $GroupId
variable.
The Set-MsolGroup command uses the $Group.ObjectId
to update the group description with the specified -Description parameter.
Conclusion
I hope the above article on how to use the Set-MsolGroup cmdlet in PowerShell to update the properties of the group in Office 365 is helpful to you.
You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.