title: How do we get the size of the file in KB using powershell scripting?
body: <p>I have tried <code>$filesize=(($fileXP).length/1KB)</code>
   but this does not retrieve the correct answer.
  As for my understanding, it is just dividing the number of characters in files with KB and giving the answer which is wrong.</p>
  
  <p>There has to be some function or attribute to define the size directly and display as we want in KB or MB or GB as required.</p>