-
Notifications
You must be signed in to change notification settings - Fork 342
New command: m365 spe containertype remove #5992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@andrewconnell any opinion on that 👆 |
2 remarks:
Documentation quote:
What will happen if we run this command when there are still containers attached? Will we remove them, or just throw an error? |
yes it will return something like
I think we should throw an error. |
Ok, thanks for clarifying. Let's open it up then. |
@Adam-it, why is this? You can remove a regular container type as well, right? |
nope that's actually by design. You may remove only trial container types and the current spec is based on CSOM based on this command PnP PS has also the same equivalent https://pnp.github.io/powershell/cmdlets/Remove-PnPContainer.html |
Seems like developer admins can delete regular container types: https://learn.microsoft.com/en-us/sharepoint/dev/embedded/getting-started/containertypes#deleting-container-types |
good find. I updated the docs. Seems like that page was added one month after I created this issue 🫤. I am almost sure that at the very beginning it was only possible for trail types 🤔 |
Uh oh!
There was an error while loading. Please reload this page.
Usage
m365 spe containertype remove [options]
Description
Remove a specific Container Type
Options
-i, --id [id]
id
orname
but not both.-n, --name [name]
id
orname
but not both.-f, --force
Examples
Removes Container Type by id
m365 spe containertype remove --id '4ec4aefd-4fa3-0e4a-20c3-6e68389e7138'
Removes Container Type by name
m365 spe containertype remove --name 'test container'
Removes Container Type by id and doesn't prompt for confirmation
m365 spe containertype remove --id '4ec4aefd-4fa3-0e4a-20c3-6e68389e7138' --force
Default properties
No response
Additional Info
We may use CSOM for this command passing the following
The CSOM call does not support filtering by
name
only byGuid
so if we want to add handling also remove the Container Type byname
what we will need to do under the hood is query all Container Types and filter them byname
.Also if more than one Container Type will be found (as the
name
does not have to be unique) CLI (when interactive mode on) should prompt to pick the correct one based onid
The text was updated successfully, but these errors were encountered: