A page with some useful admin scripts
Run devcontainer with powershell.
Install-Module -Name ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName <username@domain.com>
# Or if no browser is available in the terminal environment
Connect-ExchangeOnline -Device
# List all groups
Get-UnifiedGroup | ft Name,DisplayName,PrimarySmtpAddress,WelcomeMessageEnabled,HiddenFromAddressListsEnabled
# Change individual group
Get-UnifiedGroup <groupname/id> | Set-UnifiedGroup -UnifiedGroupWelcomeMessageEnabled:$false
# Change all groups (which are not changed yet)
# Hide from addresslist, we don't do that automatically anymore
# Get-UnifiedGroup | Where-Object { $_.HiddenFromAddressListsEnabled -Eq $False } | Set-UnifiedGroup -HiddenFromAddressListsEnabled $True
# Disable default welcome mail
Get-UnifiedGroup | Where-Object { $_.WelcomeMessageEnabled -Eq $True } | Set-UnifiedGroup -UnifiedGroupWelcomeMessageEnabled:$False
# Enable send mail to users of the group
Get-UnifiedGroup | Where-Object { $_.AutoSubscribeNewMembers -Eq $False } | Set-UnifiedGroup -AutoSubscribeNewMembers:$True
https://w365.dk/index.php/2021/07/28/change-language-of-a-shared-mailbox-in-exchange-online/
Get-MailboxRegionalConfiguration -Identity mailbox@domain.com
Set-MailboxRegionalConfiguration -LocalizeDefaultFolderName:$true -Language nl-NL -Identity mailbox@domain.com
This is available in beta powershell, but also in beta GraphAPI. https://learn.microsoft.com/en-us/graph/api/group-post-settings?view=graph-rest-beta&tabs=http
GET https://graph.microsoft.com/beta/directorySettingTemplates
# Create new settings:
POST https://graph.microsoft.com/beta/settings
{
"templateId": "62375ab9-6b52-47ed-826b-58e47e0e304b",
"values": [
{
"name": "EnableMSStandardBlockedWords",
"value": "true"
},
{
"name": "GroupCreationAllowedGroupId",
"value": "484ac1c2-dfce-4e29-9550-4e7a2b457e0a"
},
{
"name": "EnableGroupCreation",
"value": "false"
}
]
}
# GET current settings
GET https://graph.microsoft.com/beta/settings
For updating settings: https://learn.microsoft.com/en-us/graph/api/directorysetting-update?view=graph-rest-beta&tabs=http