Categories

PowerShell pack: PSuserTools

The PSusertools module contains 4 functions:

Get-CurrentUser
Get-Everyone
Start-ProcessAsAdministrator
Test-IsAdministrator

 

get-currentuser uses System.Security.Principal.WindowsIdentitiy to identify the current user. One oddity is that the group information returns the SID of the group rather than the name.  We need a SID to name translator.

Test-IsAdministrator returns true if the user is an administrator. In PowerShell this equates to running the shell with elevated privileges – good test to put in your scripts to make sure that you have the permissions to do what you need

One Response to PowerShell pack: PSuserTools

Leave a Reply