windows - Accessing Remote Registry for the currently logged in user with Powershell -


i'm trying find printer ports in use user logged in multiple machines. however, when run script running regedit myself... how go getting user logged in?

here current script:

get-content -path c:\listofcomputers.txt | foreach-object { get-itemproperty -path registry::"hkey_current_user\software\microsoft\windows nt\currentversion\printerports\" | foreach-object {get-itemproperty $_.pspath} | format-list | out-file c:\portresults.txt }  


Comments

Popular posts from this blog

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

wordpress - (T_ENDFOREACH) php error -

Using django-mptt to get only the categories that have items -