So this next post is for anyone that uses vRealize Loginsight NFS archive and currently has to manage / delete the blobs / days manually… so if your like me you time is better spent drinking beer or coffee so anything that can be automated should be!!! and this next script is exactly that!

The script is written in powershell so the idea is to schedule it…

Using the PoshSSH module it will SSH to the vRLI server, mount the NFS share if not already mounted, go through the archive structure and run recursive RM commands against folders in the NFS archive older than # days specified

Remember I keep the scripts updated on github so make sure to check it out here to make sure you are using my latest version.

No point including screenshots as this is all automated and soooo… not much to see here other than before and after which i wont bother to include…. so just try to imagine the automagic happenings that are.

DISCLAIMER: Use this at your own risk! as it deletes stuff, make sure to test it in your lab before deploying it in production!!

To create the credentials file run the following command. (you will need to do the same for the SMTP cred file)

To run the script, provide the vRLI address, the pre-stored credentials file name, days to retain and the email address to send errors too…

And here is the script…

Hope you found this helpful.