Solved

Reading ACL of RegKeys - multiple computers

Posted on 2010-09-15
3
410 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
Comment Utility
0
 

Author Comment

by:ptea
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Hi all.   The other day I had to change the passwords for a bunch of users on the fly. Because they were so many, I decided to do it in an automated way and I would like to share it with you all.   If you are not doing it directly in a Domain Co…
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 …
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now