SPFx and modern SharePoint search page for searching the current location

Modern SharePoint sites on standard release will soon receive an update to add a search box to the top Office 365 bar. This allows you to search by default in the current location, like a site or a document library. You can then configure the site to redirect user's search queries to a custom search page and you can use the amazing PnP Modern Search web parts to create a great search experience. But what if you want to pass the context of the current location to the custom search page and keep searching only on that location by default?

Update metadata on SharePoint documents and folders

If you have SharePoint managed metadata terms being used in document libraries and you decide to rename the label of a term, you can easily do so in the term store and wait for the change to propagate to your documents. But what if you want to update all documents that use a specific term to a different term that already exists? The following script will to the job for you.

Setting managed metadata fields using PnP PowerShell

A few days ago, I was trying to set some managed metadata fields in a SharePoint library using the Set-PnPListItem command - which is greatly documented. But having worked with SharePoint for quite a few years, I immediately noticed that the examples in documentation for managed metadata fields did not contain the exception case for terms with the '&' character in the label. I had to deal with this case multiple times before, so writing this blog post to hopefully save some time in the future.