Dear Powershell Nuts...this one is for you.

Holy Cow! This is some cool code folks and one I KNOW the Admi's and PS folks would love to have in the old Power Shell Kit.

I just built a tool for a team of consultants to use, and some of the commands require elevation. Rather than relying on telling them it needs to be elevated, I wanted to be able to exit immediately if the session wasn’t so precious time wasn’t wasted.

First, we need to figure out who the user is. To do that, you can use the [System.Security.Principal.WindowsIdentity]::GetCurrent() method and save it to a variable. 

Read more and see the code here.

Last modified on Saturday, 03 December 2016 18:27

Da Boss!

Website: Email: This email address is being protected from spambots. You need JavaScript enabled to view it.

Latest Content

Visit the Digitalsmind Video YouTube Page!

Did you know we have a video page on YouTube? 

Well... WE DO! 

Check us out! 

- Our Video page.