Cli-microsoft365: New command: aad o365groups recyclebinitem restore

Created on 27 Dec 2020  路  6Comments  路  Source: pnp/cli-microsoft365

aad o365group recyclebinitem restore

Restores a Group from the recycle bin

| Option | Description |
| ----------------------- | ----------------------------------------- |
| --id [id] | Id of the Group in the recycle bin |
| -d, --displayName [displayName] | Displayname of the Group |
| -m, --mailNickname [mailNickname] | Mailnickname of the Group |
| --query [query] | JMESPath query string |
| --confirm | Does not ask for confirmation |

Reference issue: #1982

good first issue new feature work in progress

All 6 comments

Looking at the spec, is there a reason why the name and mail shouldn't be an exact match rather than a 'begins with'? In other commands we use an exact match so for consistency it would be better to follow the same approach here.

Also, let's change o365groups to a singular o365group

I would like to work with this one since I'm already working with the same chain of commands

Thank you. All yours

I'm working on it and expect to finish in the next couple of days.

@waldekmastykarz and @plamber , I was looking that there is another command that seems to do the same thing as this one, is this correct?

O365GROUP_RESTORE: ${prefix} o365group restore

Hi @douglasromao,
yes. You are right. In the issue #1982 we mentioned that we are extending the existing command with the new parameters and create an alias for the old one. In such a way we ensure that we do not have breaking changes for scripts using the old command name.

Maybe we were not explicit enough in this issue. Sorry for that.

My recommendation would be to take the existing command, rename the name of the files and create an alias (We have an example how to implement the alias under mail-send.ts). Afterwards, you should add the additional filter parameters we mentioned in this issue.

Is this ok for you?

br,
Patrick

Was this page helpful?
0 / 5 - 0 ratings