October 23, 2023 - Self-Elevate Powershell Snippet
Snippet Breakdown This is by far one of my most favorite snippets… To use, paste this snippet at the beginning of your script, and when it runs it determines if it is running in an elevated session, and if not re-launches script to be elevated: