Hi all:
I am trying to find out if there is a way to list the size of a file thats local to the powercli server. The background is that I have a script that runs daily and emails out the report of what it finds during the audit. What I am trying to update the script to do is only send the report if the audit actually found anything; and not an empty file attachment...
Thanks in advance for any help you can provide, and please let me know if more information is needed.
thanks!
Jade
Hi Jade,
you can do the following to check the size of a file called vmware.log:
if ((Get-ChildItem vmware.log).Length -gt 0) { # E-mail logfile}
Regards,Robert
Hi Jade,
you can do the following to check the size of a file called vmware.log:
if ((Get-ChildItem vmware.log).Length -gt 0) { # E-mail logfile}
Regards,Robert
That was exactly what I was looking for! Thank you for the lightning fast (and correct!) answer!
Jade