Articles on: Scripts

Acommsqadmin@stpud.usDescription:

Articles on: Scripts

Acommsqadmin@stpud.usDescription:





This script is used to add members to the unified groups using CSV File.

The CSV file should contain the following columns:

-Identity:  Identity parameter specifies the Microsoft 365 Group that you want to modify. (Name, DN, email any one of these which should be unique)

-LinkType: The LinkType parameter specifies the Microsoft 365 Group property that you want to modify. (Member, Owner, Subscriber)

-Links: The Links parameter specifies the recipients to add to the Microsoft 365 Group. (UPN of the user)


Script:





Install-Module -Name AzureAD

Connect-AzureAD

Install-Module -Name Msonline

Connect-MsolService

Import-Csv -Path "C:\Users\tv\Desktop\office365.csv" | foreach {

Add-UnifiedGroupLinks –Identity $._name  –LinkType Members  –Links $_.members

}

Updated on: 31/01/2023

Updated on: 01/07/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!