Add Site Collection Admin to SharePoint Online Site Collections by URL Filter

TLDR; Use Where Instead of -filter I had a request to give a specific user account Site Collection Admin (SCA) rights a group of Modern Team sites in SharePoint Online. My friend Daniel has previously created a script to give a user account SCA rights to all the sites in the tenant.  I knew I could use create a variable $a  and then use Get-SPOSite and filter by some of the site properties. I also know I could do a foreach of $a and have it return the site collection then I could do some magic against the objects. Step...

Read More