This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remember to run the script "as Administrator" | |
$AdminNote1 = Read-Host 'Are you running this script in Powershell as administrator? (Yes/No)' | |
$pathExclusions = New-Object System.Collections.ArrayList | |
$processExclusions = New-Object System.Collections.ArrayList | |
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null | |
$pathExclusions.Add('C:\Windows\assembly') > $null | |
$pathExclusions.Add($env:USERPROFILE + '\AppData\Local\Microsoft\VisualStudio') > $null | |
$pathExclusions.Add($env:USERPROFILE + '\.nuget\packages') > $null | |
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install-Module ExchangeOnlineManagement | |
Install-Module -Name MicrosoftTeams | |
Install-Module AzureRM -AllowClobber | |
Install-Module -Name Microsoft.Online.SharePoint.PowerShell | |
Install-Module -Name AzureAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Instructions for both O365 Groups and Distribution Lists | |
#For O365 Groups: | |
#1.a Find specific group name. Replace put group name here with the name of the group. | |
Get-UnifiedGroup -Identity "put group name here" | Select Name,@{Name="NameLength";Expression={$_.name.length}}, EmailAddresses, Alias, ServerName, AccessType | |
#1.b List all groups with names. | |
Get-UnifiedGroup | Select Name,@{Name="NameLength";Expression={$_.name.length}}, EmailAddresses, Alias, ServerName, AccessType | |
#2. Add mail address. Replace put group name here with the name of the group. Replace putmail address here with the new mail address. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-UnifiedGroup -DlIdentity "insert name of Distribution List here" –ConvertClosedDlToPrivateGroup:$true -DeleteDlAfterMigration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Get list of Room Lists for Room Finder in Outlook | |
Get-DistributionGroup -ResultSize Unlimited | Where {$_.RecipientTypeDetails -eq "RoomList"} | Format-Table DisplayName,Identity,PrimarySmtpAddress -AutoSize | |
#Get list of Rooms | |
Get-Mailbox -RecipientTypeDetails RoomMailbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Get-DistributionGroup).identity | ForEach-Object{ | |
$DistributionGroupName = $_ | |
Get-DistributionGroupMember -Identity $_ | ForEach-Object{ | |
[PSCustomObject]@{ | |
DistributionGroup = $DistributionGroupName | |
MemberName = $_.Name | |
#Other recipient properties here | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get-mailbox -id <replace brackets and contents with mail address> | select whenCreated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Get all mail aliases for group: | |
#Distribution Group: | |
Get-distributiongroup <replace brackets and contents with Group name> | select -ExpandProperty EmailAddresses | |
#O365 Group: | |
Get-UnifiedGroup <replace brackets and contents with Group name> | select -ExpandProperty EmailAddresses | |
OlderNewer