How to get local user rights?


i need test local user accounts user rights applied @ local computer level.  there way short of exporting current local security policy?

i've seen some scripts use secedit /export /areas user_rights /cfg to export settings, update these settings, , re-import them.  appears way modify local user rights.

is there way simply inspect them -- without using secedit? 

i can list of accounts in local admins group get-cimassociatedinstance:

$localadmins = @(get-cimassociatedinstance -inputobject $(get-ciminstance -classname win32_group -filter "name = 'administrators'") -resultclassname win32_useraccount | select -expandproperty caption)

is possible to enumerate user rights way?

cf: technet.microsoft.com/en-us/library/hh875542.aspx

even easier:

ps c:\scripts> $privs=whoami /priv /fo csv | convertfrom-csv ps c:\scripts> $privs  privilege name                description                          state --------------                -----------                          ----- seshutdownprivilege           shut down system                 disabled sechangenotifyprivilege       bypass traverse checking             enabled seundockprivilege             remove computer docking station disabled seincreaseworkingsetprivilege increase process working set       disabled setimezoneprivilege           change time zone                 disabled

you should take vacation;  travel redmond , take courses @ msu.

i hear can piece of salmon there.


\_(ツ)_/




Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

DCOM received error "2147746132" from...

DFSR RPC replication errors 5014 1726 with large files over VPN

ADFS 3.0 Event ID 4625 | An Error occurred During Logon | Status: 0xC000035B