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

Published Wed, Mar 3 2010 22:53 by RichardSiddaway

Comments

# re: PowerShell pack: PSuserTools

How to download a copy of PSuserTools?

Dave.Willms@torontopolice.on.ca

Friday, August 10, 2012 12:20 PM by Dave Willms

Leave a Comment

(required) 
(required) 
(optional)
(required) 
If you can't read this number refresh your screen
Enter the numbers above: