Get All AIP encrypted files - SharePoint Online

One of the recent project merger and acquisition.  Technology - M365 tenant to Tenant migration Areas of consolidation 1. Mailboxes  2. SharePoint online data 3. OneDrive for Business data 4. Teams data migration 5. Security and Compliance Migration  Area of concern from security and compliance side was the encrypted files within EXO, SPO, Teams, ODB. Issue with encrypted data migration - end users will not be able to access the documents once the Source tenant is decommissioned.   Solution available -  Ask end users to unencrypt the data before migration  Alternet Solution - 1. Decrypt the files, mails using eDiscovery - This will give us output in PST format will is available for offline access, but the data in source will still be encrypted.  Decryption in eDiscovery - Microsoft Purview (compliance) | Microsoft Docs   2. Use Get-AIPfileLabel and Get-AIPFileLabel but in order to use this you must be aware of all the files paths.  Challenges -  1. We do not want end user intervention

Add members to office 365 Security Group Using PowerShell and CSV



Step 1. Create a CSV file with a column “UserPrincipalName” and add all users under it who are to be added as a member of the group.

Note – Sign In address need to be added under the userPrincipleName.


Step 2.  Run The below command.

$sub = Import-Csv C:\RAhul\sspruser.com.csv  csv  {enter the Path of same/Step1 CSV that was created by you with users details}

$sub | Foreach {Get-Msoluser -UserPrincipalName $_.Userprincipalname | select Objectid } | Export-csv C:\RAhul\sspruser.com.csv

This will convert the user’s identity to their unique guid details, and export it to the same CSV file.


Step 3. Collect the guid ID of the security group.
The below command will help with the object ID of the Group.
Get-MsolGroup -all | where-object { $_.DisplayName -eq "SSPRSecurityGroupUsers"} | FL

I have my object ID as below.
ObjectId                  : XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX


Step 4. Run the below command to Add members in the CSV to the Group.

$sub2 = Import-Csv C:\RAhul\sspruser.com.csv
$sub2 | Foreach {Add-MsolGroupMember -groupObjectid ‘XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX’ -GroupMemberObjectId $_.ObjectId -GroupMemberType User}


Step 5. Extract the users from the Group.


Get-MsolGroupMember -all -groupObjectid 'XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX' | Select DisplayName,EmailAddress,GroupMemberType | Export-csv C:\RAhul\security-group-members.csv

Comments

  1. Thanks for sharing this .It is very useful for our usage also. VRS Technologies LLC offers MS office 365 Migration Services Dubai

    ReplyDelete

Post a Comment

Popular posts from this blog

Error - AttributeValueMustBeUnique in Azure AD connect sync

Error - QuarantinedAttributeValueMustBeUnique

Enforce MFA using CSV

Analyze Office 365 Message headers