PowerShell: Check remote computers for a specific file
This PowerShell script checks for a file on computers listed in a text file. It defines a function for the session and pipes the computer names from the file to that function.
In this example, I will check whether install.exe exists on each remote system and display the computer name when the file is found.
Create C:\Scripts\Active_Computers.txt and add the computer names.
| |
6 comments
Comments from the original WordPress site, kept read-only.
How would one make this a vbscript instead of powershell?
Need a vbscript that check a list of computernames, if there's a specific file under c:\program files\myapp
Hi Johan,
I used this before. Let me check if I can find something in my own library.
I also wanted to use this for Vbscript instead of powershell? Do you have it for Vbscript?
Hi Ivan
Nice script! How could I add the functionality to search for specific multiple files on a remote computer?
Nice Script!
How can I add functionality to get the LastWriteTime, DateModified, CreationDate of the remote file?
Great script and works beautifully
I have added the line just to look good
Write-Host "$_" -Foregroundcolor Green
Maelito