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
New command: m365 spe containertype remove #5992
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. |
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
❗Important
We need to handle that only
Trail
Container Type may be removed. This should be added to the command specThe text was updated successfully, but these errors were encountered: