Solved

Reading ACL of RegKeys - multiple computers

Posted on 2010-09-15
3
420 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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 …
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

680 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