Hello,
I'm very new to Powershell/scripting in general and have found this website to be a great resource. So far my Powershelling has been limited to little one liners but I now want to challenge myself to write a proper script.
I have a computer list in a text file computers.txt
I must remotely, list of registry key.
HKLM:\SOFTWARE\ODBC\ODBCINST.INI\*
HKLM:\SOFTWARE\ODBC\ODBC.INI\*
I think I understand the steps I need to take - I will roughly outline below:
-get-content of list of PCs
-foreach pc do Get-ChildItem -Path HKLM:\SOFTWARE\ODBC\ODBCINST.INI\* and Get-ChildItem HKLM:\SOFTWARE\ODBC\ODBC.INI\*
-Output results to a CSV file.
I'm having real problems in understanding how I put this all together and would appreciate if someone could spare a little time to explain to me if my methodology is correct and how I would go about actually writing this.
$ComputersSource = Get-Content 'computers.txt'
$OutFile = 'Get-ODBCKeyRegistry.csv'
Foreach($Computer in $ComputersSource)
{Get-ChildItem -Path HKLM:\SOFTWARE\ODBC\ODBCINST.INI\*}
Export-Csv
I greatly appreciate any help that could be given. sorry for my english, I'm french
Thanks!
Jim