I am trying to create new room distribution list in O365 for my company via PowerShell.
I want to list those rooms in MS Teams so I can book via Teams client
From what I learned, the steps are pretty straightforward
- Create new distribution list with room mailboxes as members
New-DistributionGroup -Name "ShRooms" -Members room1@contoso.com,room2contoso.com
- Set the group as RoomList
Set-DistributionGroup -Identity "ShRooms" -RoomList
But instead of some positive result, I got this:
A parameter cannot be found that matches parameter name 'RoomList'.
+ CategoryInfo : InvalidArgument: (:) [Set-DistributionGroup], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Set-DistributionGroup
+ PSComputerName : outlook.office365.com
I tried
(GET-Command Set-DistributionGroup).parameters
and got
Key Value
--- -----
WindowsEmailAddress System.Management.Automation.ParameterMetadata
RejectMessagesFromSendersOrMembers System.Management.Automation.ParameterMetadata
AcceptMessagesOnlyFromDLMembers System.Management.Automation.ParameterMetadata
CustomAttribute10 System.Management.Automation.ParameterMetadata
ModerationEnabled System.Management.Automation.ParameterMetadata
ExtensionCustomAttribute4 System.Management.Automation.ParameterMetadata
Identity System.Management.Automation.ParameterMetadata
CustomAttribute8 System.Management.Automation.ParameterMetadata
DisplayName System.Management.Automation.ParameterMetadata
Confirm System.Management.Automation.ParameterMetadata
CustomAttribute3 System.Management.Automation.ParameterMetadata
Name System.Management.Automation.ParameterMetadata
CustomAttribute5 System.Management.Automation.ParameterMetadata
ReportToManagerEnabled System.Management.Automation.ParameterMetadata
CustomAttribute7 System.Management.Automation.ParameterMetadata
BypassModerationFromSendersOrMembers System.Management.Automation.ParameterMetadata
PipelineVariable System.Management.Automation.ParameterMetadata
AcceptMessagesOnlyFromSendersOrMembers System.Management.Automation.ParameterMetadata
ExtensionCustomAttribute2 System.Management.Automation.ParameterMetadata
RejectMessagesFrom System.Management.Automation.ParameterMetadata
WarningVariable System.Management.Automation.ParameterMetadata
CustomAttribute6 System.Management.Automation.ParameterMetadata
SendOofMessageToOriginatorEnabled System.Management.Automation.ParameterMetadata
CustomAttribute1 System.Management.Automation.ParameterMetadata
ErrorAction System.Management.Automation.ParameterMetadata
Verbose System.Management.Automation.ParameterMetadata
ExtensionCustomAttribute3 System.Management.Automation.ParameterMetadata
CustomAttribute9 System.Management.Automation.ParameterMetadata
ErrorVariable System.Management.Automation.ParameterMetadata
ModeratedBy System.Management.Automation.ParameterMetadata
CustomAttribute14 System.Management.Automation.ParameterMetadata
MailTip System.Management.Automation.ParameterMetadata
Debug System.Management.Automation.ParameterMetadata
SimpleDisplayName System.Management.Automation.ParameterMetadata
PrimarySmtpAddress System.Management.Automation.ParameterMetadata
AcceptMessagesOnlyFrom System.Management.Automation.ParameterMetadata
MailTipTranslations System.Management.Automation.ParameterMetadata
CustomAttribute15 System.Management.Automation.ParameterMetadata
WhatIf System.Management.Automation.ParameterMetadata
ReportToOriginatorEnabled System.Management.Automation.ParameterMetadata
OutVariable System.Management.Automation.ParameterMetadata
ExtensionCustomAttribute1 System.Management.Automation.ParameterMetadata
RejectMessagesFromDLMembers System.Management.Automation.ParameterMetadata
ExtensionCustomAttribute5 System.Management.Automation.ParameterMetadata
MemberJoinRestriction System.Management.Automation.ParameterMetadata
CustomAttribute4 System.Management.Automation.ParameterMetadata
InformationVariable System.Management.Automation.ParameterMetadata
Alias System.Management.Automation.ParameterMetadata
ManagedBy System.Management.Automation.ParameterMetadata
GrantSendOnBehalfTo System.Management.Automation.ParameterMetadata
CustomAttribute2 System.Management.Automation.ParameterMetadata
CustomAttribute13 System.Management.Automation.ParameterMetadata
SendModerationNotifications System.Management.Automation.ParameterMetadata
OutBuffer System.Management.Automation.ParameterMetadata
CustomAttribute11 System.Management.Automation.ParameterMetadata
EmailAddresses System.Management.Automation.ParameterMetadata
InformationAction System.Management.Automation.ParameterMetadata
CustomAttribute12 System.Management.Automation.ParameterMetadata
WarningAction System.Management.Automation.ParameterMetadata
AsJob System.Management.Automation.ParameterMetadata
So this probably means that there really is not -RoomList
parameter present, but from what I learned in documentation, it should be (we are running our company O365 in Europe, no special set-up)
Hope somebody can tell me how to change that distribution list. Thx