Usage
m365 spe containertype get [options]
Description
Get a specific Container Type
Options
| Option |
Description |
-i, --id [id] |
The Id of the Container Type. Specify either id or name but not both. |
-n, --name [name] |
The Container Type name. Specify either id or name but not both. |
Examples
Gets Container Type by id
m365 spe containertype get --id '4ec4aefd-4fa3-0e4a-20c3-6e68389e7138'
Gets Container Type by name
m365 spe containertype get --name 'test container'
Additional Info
We may use CSOM for this command passing the following
<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="SharePoint Online PowerShell (16.0.24322.0)"
xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009">
<Actions>
<ObjectPath Id="49" ObjectPathId="48" />
<Method Name="GetSPOContainerTypeById" Id="50" ObjectPathId="48">
<Parameters>
<Parameter Type="Guid">{4ec4aefd-4fa3-0e4a-20c3-6e68389e7138}</Parameter>
<Parameter Type="Enum">1</Parameter>
</Parameters>
</Method>
</Actions>
<ObjectPaths>
<Constructor Id="48" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" />
</ObjectPaths>
</Request>
⚠️ Tricky part
The CSOM call does not support filtering by name only by Guid so if we want to add handling also querying the Container Type by name what we will need to do under the hood is query all Container Types and filter them by name.
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 on id
Usage
m365 spe containertype get [options]
Description
Get a specific Container Type
Options
-i, --id [id]idornamebut not both.-n, --name [name]idornamebut not both.Examples
Gets Container Type by id
m365 spe containertype get --id '4ec4aefd-4fa3-0e4a-20c3-6e68389e7138'Gets Container Type by name
m365 spe containertype get --name 'test container'Additional Info
We may use CSOM for this command passing the following
The CSOM call does not support filtering by
nameonly byGuidso if we want to add handling also querying the Container Type bynamewhat 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
namedoes not have to be unique) CLI (when interactive mode on) should prompt to pick the correct one based onid