Skip to content

New command: spo list defaultvalue list #6404

@milanholemans

Description

@milanholemans

Usage

m365 spo list defaultvalue list [options]

Description

Retrieves default column values set for a specific document library

Options

Option Description
-u, --webUrl <webUrl> URL of the site where the list is located.
-i, --listId [listId] ID of the list. Specify either listTitle, listId, or listUrl.
-t, --listTitle [listTitle] Title of the list. Specify either listTitle, listId, or listUrl.
--listUrl [listUrl] Server- or site-relative URL of the list. Specify either listTitle, listId, or listUrl.
--folderUrl [folderUrl] Only get default column values from a specific folder.

Examples

List all default column values of a list specified by title

m365 spo list defaultvalue list --webUrl https://contoso.sharepoint.com/sites/marketing --listTitle "Project Documents"

List all default column values of a list specified by ID

m365 spo list defaultvalue list --webUrl https://contoso.sharepoint.com/sites/marketing --listId 12345678-90ab-cdef-1234-567890abcdef

List all default column values of a list specified by URL

m365 spo list defaultvalue list --webUrl https://contoso.sharepoint.com/sites/marketing --listUrl "/sites/marketing/Project Documents"

Default properties

  • Field
  • Value
  • Path

Additional Info

The output should look something like this:

[
  {
    "fieldName": "Department",
    "folderUrl": "/sites/marketing/Shared Documents/Projects",
    "fieldValue": "Marketing"
  },
  {
    "fieldName": "ProjectStatus",
    "folderUrl": "/sites/marketing/Shared Documents/Projects/Active",
    "fieldValue": "Active"
  },
  {
    "fieldName": "Region",
    "folderUrl": "/sites/marketing/Shared Documents/Projects/International",
    "fieldValue": "Europe"
  }
]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions