Powershell - Query remote Local Security Policy?

7,056

The best recommendation I have right now is that you check out using WMI for this (see root\RSOP\computer namespace). Unfortunately all the times that this topic has come up, I never seem to have been able to find a solution to it. There's an old thread on MSDN from 2007 that was never answered either.

You can use SAPIEN WMI Explorer (link below), a free community tool, to browse the WMI namespace and see if what you're looking for is there. I don't believe it is, but you might find some other useful things there.

http://www.primaltools.com/downloads/communitytools/

Share:
7,056

Related videos on Youtube

Dan Black
Author by

Dan Black

Updated on September 17, 2022

Comments

  • Dan Black
    Dan Black over 1 year

    I am looking to remotely query a list of servers, to ensure they are "set up" correctly

    One of the things I want to check is the Local Security Policy -> User Rights Assignment ->Deny Log on through terminal services

    Is it possible to retrieve this information through through script? Using NTrights looks to almost get there, but that looks to set or revoke not list permissions.

    Most servers I am interested in are Windows Server 2003. I am running PowerShell 2.0.