Solved

Reading ACL of RegKeys - multiple computers

Posted on 2010-09-15
3
419 Views
Last Modified: 2012-05-10
Hi there,

I have to analyse the ACL configuration of two RegKeys on round about 1.000 Windows Servers. I tried to find a proper class in WMI to query the ACL but nothing have found yet... Query Regkeys is quiet easy, but do not know how to get the ACL of it - anybody does?

Cheers
0
Comment
Question by:ptea
  • 2
3 Comments
 
LVL 8

Expert Comment

by:thetmanvn
ID: 33680723
0
 

Author Comment

by:ptea
ID: 33681053
thx for that, but if I am right .NET/get-ACL only works on the local machine and not remote(?). Shoudl run this query over 1.000 machines. Do you know if there is way to do this with WMI - can't find a proper Class....
0
 
LVL 8

Accepted Solution

by:
thetmanvn earned 500 total points
ID: 33681390
You can work with remote registry in .NET/PS. See here:

http://bsonposh.com/archives/207

This article does not mention $Srv parameter, but in this article, it describe in example:

http://bsonposh.com/archives/258 (Remote retrieve Installed software)


Hope this help

# Get-InstalledSoftware
Param($srv=$env:ComputerName)
$regKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine,$Srv)
$key = $regKey.OpenSubkey("Software\Microsoft\Windows\CurrentVersion\Uninstall",$false)
Write-Host
Write-Host "Getting Software in Uninstall Key" -Fore Green
Write-Host ("-"*60) -Fore Gray
$key.GetSubKeyNames()
Write-Host
Write-Host "Getting Software From Win32_Product" -Fore Green
Write-Host ("-"*60) -Fore Gray
get-wmiobject Win32_Product -comp $srv | foreach{$_.Name}
Write-Host

Open in new window

0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question