Script to check file properties

 This script grabs a list of server names from a text file and pings those machines. It then searches for a file on the computers listed in the input file and writes the machinename, filename, filesize, file/productversion and last write time to a .csv. Log file is auto-generated

 
 
 
 
 
4.5 Star
(2)
1,839 times
Add to favorites
Storage
6/19/2012
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Getting the below error...please help
    2 Posts | Last post June 19, 2012
    • PS C:\temp> .\GetFileVersion.ps1
      Out-File : Could not find a part of the path 'C:\temp\log\Autolog
      At C:\temp\GetFileVersion.ps1:15 char:25
      + $exporttofile | out-file  <<<< $logfile -append -encoding utf8
      
      Note: I have changed the locations to "c:\temp" for the server list and log creation path.
    • Hello Zombiehacker,
      
      The reason for this is that you used a path that did not exist, I have updated the script to provide you with better error handling so it should prompt the reason why it does not complete the command. Can you try the following line:
      
      Get-FileVersion.ps1 -InputFile C:\ListofServers.txt -LogFilePath C:\
      
      Assuming the names are correct this should give you the details of a file located on the servers listed in the -InputFile. If this does not work could you please post the error you are receiving?