I have a modern SharePoint site whose library has gone rogue and is no longer associated with the parent site (it's a long story). If I try to access this library, I get an error telling me I don't have permission to access it. But, since it's no longer available through the SharePoint UI, I'm thinking that PowerShell would provide a mechanism to assign permissions so I can access the files/folders in this ronin library. Then I could move the files to where they belong.
But ... I'm not that familiar with SharePoint at the level needed to create a script to do this. Anyone have any ideas about what such a script would look like? I just need to assign myself as a user to the library using its URL. Sounds easy unless you don't know how to do it.
Any ideas?
I've tried accessing this library via the SharePoint UI using its URL, but I don't have permission to do so. I can't assign permissions via the UI, so I'm thinking PowerShell might be the way to accomplish assigning of permissions to the library.