Windows PowerShell snap-ins wrapped into modules will give us module auto-loading for the snap-ins.
Rolling logs will help you understand what's happening in your script, live.
Install a PowerShell module on Windows once and use it with both Windows PowerShell and PowerShell (core)
Best practices using the Microsoft Graph PowerShell SDK to for AzureAD automation, part 1.
Add-LocalGroupMember -Group "Hyper-V Administrators" -Member "$(whoami)"