cawasaki
asked on
powershell script to export a value of register keys and check if .exe file exist in specific folder
Hi,
I need a script to do this for a txt file with the server name like this:
server1
server2
server3
.....
the script must check all this remotely:
1-Check if .exe file exist in this 2 folders and export the file name if it is .exe file
-c:\test1\folder1
-c:\test2\folder2
2-Export all keys and Data for this registry keys:
-HKEY_LOCAL_MACHINE\SOFTWA RE\Microso ft\Windows \table pc
-HKEY_CURRENT_USER\SOFTWAR E\Microsof t\Windows\ table pc
i need a result file with all this information.
Thanks if you can help me.
I need a script to do this for a txt file with the server name like this:
server1
server2
server3
.....
the script must check all this remotely:
1-Check if .exe file exist in this 2 folders and export the file name if it is .exe file
-c:\test1\folder1
-c:\test2\folder2
2-Export all keys and Data for this registry keys:
-HKEY_LOCAL_MACHINE\SOFTWA
-HKEY_CURRENT_USER\SOFTWAR
i need a result file with all this information.
Thanks if you can help me.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok first test:
[PS] C:\Temp\PLOP>.\plop.ps1
Missing closing '}' in statement block.
At C:\Temp\PLOP\plop.ps1:25 char:1
+ } <<<<
so i added the missed }
and it work but i have 0 result, not file nothing and i needalog to check it after i execute the script.
thanks
[PS] C:\Temp\PLOP>.\plop.ps1
Missing closing '}' in statement block.
At C:\Temp\PLOP\plop.ps1:25 char:1
+ } <<<<
so i added the missed }
and it work but i have 0 result, not file nothing and i needalog to check it after i execute the script.
thanks
ASKER
oki have test and my constat:
1-if in one server in the list one folder not exist the script exit check
2- the result is just viewed in the screen,i need a result file where i can check the result like this:
server1:
file.exe, file2.exe....
server2:
file.exe, file2.exe....
server3:
file.exe, file2.exe....
Thanks
1-if in one server in the list one folder not exist the script exit check
2- the result is just viewed in the screen,i need a result file where i can check the result like this:
server1:
file.exe, file2.exe....
server2:
file.exe, file2.exe....
server3:
file.exe, file2.exe....
Thanks
ASKER
Up , any help plz?
ASKER
i accept your partial script.
Thanks
Thanks
ASKER
2-Export all keys and Data for this registry keys:
-HKEY_LOCAL_MACHINE\SOFTWA
-HKEY_CURRENT_USER\SOFTWAR
???
thanks for your help