How to get the size of the file using Get-ItemProperty in powershell!

Hi,

I have a file having data around 5GB. I tried to get size of the file using get-content $path2 | Measure-Object method. But its taking more time as Get-Content cmdlet is present.

Is there method to get the size of this kind of file very quickly. I would like to get the file size using Properties of a file using Get-ItemProperty.

Can anyone suggest me on this,

Thanks,
Dinesh

Hi Dinesh,
This sounds like a PowerShell question and not one specifically about Octopus Deploy. We cannot provide one on one support for questions like this that our product is not involved with. There are many search results if you google for something like “Get file size in powershell”. Here is one example
https://social.technet.microsoft.com/Forums/lync/en-US/e613af97-07bd-4c13-a9a3-4da811d608d4/how-to-determine-the-file-size-using-powershell-script?forum=ITCG

Please let us know if you have any further questions regarding your usage of Octopus Deploy.
Cheers,
Rob