Undo-SoftDeletedUnifiedGroup

Soft-deleted Office 365 groups are groups that have been deleted, but can be restored within 30 days of being deleted. All of the group contents can be restored within this period. After 30 days, soft-deleted Office 365 groups are marked for permanent deletion and can’t be restored.

Undo-SoftDeletedUnifiedGroup -SoftDeletedObject “Marketing Department”

Update-DistributionGroupMember

Use the Update-DistributionGroupMember cmdlet to replace all members of distribution groups and mail-enabled security groups. To add or remove existing group members, use the Add-DistributionGroupMember and Remove-DistributionGroupMember

Update-DistributionGroupMember
[-Identity]
[-BypassSecurityGroupManagerCheck]
[-Confirm]
[-DomainController ]
[-Members ]
[-WhatIf]

Update-DistributionGroupMember -Identity “Research Reports” -Members chris@cloudrain.com,michelle@cloudrain.com,laura@cloudrain.com,julia@cloudrain.com

Script to create Active Directory User ID using Powershell

Script to create User ID(use this command in AD server)

New-ADUser -Name(Read-Host -AsPlainText “Type Name”) -DisplayName(Read-Host -AsPlainText “Type Display Name”)-GivenName(Read-Host -AsPlainText “Type First Name”) -Surname(Read-Host -AsPlainText “Type Last Name”) -Manager(Read-Host -AsPlainText “Type Manager Name”) -MobilePhone(Read-Host -AsPlainText “Type Mobile Number”) -SamAccountName(Read-Host -AsPlainText “Type UserName”) -UserPrincipalName(Read-Host -AsPlainText “Type UPN”) -Path “OU=users,OU=users,OU=ssg-india,DC=ssg,DC=com” -Title(Read-Host -AsPlainText “Type Title”) -Department(Read-Host -AsPlainText “Type Department”) -Description(Read-Host -AsPlainText “Type Description”) -office(Read-Host -AsPlainText “Type Office Name”) -EmailAddress(Read-Host -AsPlainText “Type Email Address”) -AccountPassword(Read-Host -AsSecureString “Type Password”) -Enabled $true