Restrict Windows 10 and Windows 11 logon to the current user or user who enrolled the device during Autopilot

A while back I investigate if there was any possibility to lock down a Windows 10 or 11 device that

Import the Intune powershell sdk module in Azure automation

One of the great new-ish features if not the greatest feature is the option to import the Intune Powershell SDK