aad o365group add¶
Creates a Microsoft 365 Group
Usage¶
m365 aad o365group add [options]
Options¶
-n, --displayName <displayName>
- Display name for the Microsoft 365 Group
-d, --description <description>
- Description for the Microsoft 365 Group
-m, --mailNickname <mailNickname>
- Name to use in the group e-mail (part before the
@
) --owners [owners]
- Comma-separated list of Microsoft 365 Group owners
--members [members]
- Comma-separated list of Microsoft 365 Group members
--isPrivate
- Specify, if the Microsoft 365 Group should be private. If not specified, will create a public group (default)
--allowMembersToPost [allowMembersToPost]
- Set if only group members should be able to post conversations to the group
--hideGroupInOutlook [hideGroupInOutlook]
- Set to hide the group in Outlook experiences
--subscribeNewGroupMembers [subscribeNewGroupMembers]
- Set to subscribe all new group members to receive group conversation emails when new messages are posted in the group
--welcomeEmailDisabled [welcomeEmailDisabled]
- Set to not send welcome emails to new group members
-l, --logoPath [logoPath]
- Local path to the image file to use as group logo
-h, --help [help]
- Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isfull
. --query [query]
- JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
- Output type.
json,text,csv,md
. Defaultjson
--verbose
- Runs command with verbose logging
--debug
- Runs command with debug logging
Remarks¶
When specifying the path to the logo image you can use both relative and absolute paths. Note, that ~ in the path, will not be resolved and will most likely result in an error. If an invalid user is provided in the comma-separated list or Owners or Members, the command operation will fail and the Micrsoft 365 Group will not be created.
Examples¶
Create a public Microsoft 365 Group
m365 aad o365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance
Create a private Microsoft 365 Group
m365 aad o365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --isPrivate
Create a public Microsoft 365 Group and set specified users as its owners
m365 aad o365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --owners "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
Create a public Microsoft 365 Group and set specified users as its members
m365 aad o365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --members "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
Create a public Microsoft 365 Group and allows only group members to be able to post conversations to the group.
m365 aad o365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --allowMembersToPost
Create a public Microsoft 365 Group and hides it from the Outlook experiences (web and client).
m365 aad o365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --hideGroupInOutlook
Create a public Microsoft 365 Group and subscribe all new group members to receive group conversation emails when new messages are posted in the group.
m365 aad o365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --subscribeNewGroupMembers
Create a public Microsoft 365 Group and set to not send welcome emails to new group members.
m365 aad o365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --welcomeEmailDisabled
Create a public Microsoft 365 Group and set its logo
m365 aad o365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --logoPath images/logo.png