From the course: PowerShell for Microsoft 365 Administration

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

How to create, update, and delete lists and libraries

How to create, update, and delete lists and libraries

From the course: PowerShell for Microsoft 365 Administration

How to create, update, and delete lists and libraries

- Now, when working with the site collections and the subsites, one of the areas of focus will often be lists and libraries. And of course, as with some of the features that we've seen so far in the out-of-the-box capabilities, you don't get the commands that are required to manage specific things like lists and libraries. So what we can do here is we can repeat the same process we just went through by creating a specific function. So I'm actually just going to paste in here, the code for one of the functions which is called "Get-SPOList". So this is utilizing the CSOM objects, again. Now, obviously as before, it's going to require a web URL and a credential object and then it will connect to the object or the URL that we specify and effectively retrieve the lists and load them for me. So, if we look into our web object from before, we still have our URL which is the "Global Sales" and the PowerShell subsite.…

Contents