How can get value of registry DWORD value of remote computers with powershell


hi

i using below script registry of remote computers powershell not desired result.

$computers = import-csv 'c:\new folder\dclist.csv'
$key = "software\microsoft\active setup\installed components\{a509b1a7-37ef-4b3f-8cfc-4f3a74704073}"
foreach ($computer in $computers)
{
get-regdword -computername $computer -key $key -value isinstalled
}

as have installed remoteregistry pssnapin well..

also how can invoke-command ............

please or guide me 

if running invoke-command, not need remoteregistry snapin because directly on systems , can use registry provider information. apologies in advance horrible formatting.

invoke-command -computername $computername ` -scriptblock {     get-itemproperty `     -path "hklm:software\microsoft\active setup\installed components\{a509b1a7-37ef-4b3f-8cfc-4f3a74704073" `     -name "isinstalled" }



boe prox
blog | twitter
poshwsus | poshpaig | poshchat | posheventui
powershell deep dives book





Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

WIMMount (HSM) causing cluster storage to go redirected (2012r2 DC)

Failed to delete the test record dcdiag-test-record in zone test.com

Azure MFA with Azure AD and RDS