Detect and Elevate a PowerShell session

Detect and Elevate a PowerShell session

We’ve set out to help a customer with automation within their IT department.
Some daily tasks require an elevated prompt, there is no way around it. But it’s not obvious how to check if the current prompt is elevated, or how to elevate the session. So here is a how-to…