Laggasaurous 0 Posted January 4 Hi All, I am relatively inexperienced in scripts but need assistance with creating a script to do the following: For our clients, we need to remove terminated user data after 30 days. We thought it best to create a folder that we can move their profile to, and then have a script set up to run every 30 days to remove anything that has been in that folder for more than 30 days. We would call that folder something like "Terminated User Data". Any guidance on this or suggestions are much appreciated! Thank you! -Anthony Share this post Link to post Share on other sites
Laggasaurous 0 Posted January 10 Hi All, just checking to see if anyone has any insight into this. Thank you! Share this post Link to post Share on other sites
Joe.McCall 9 Posted January 11 My recommendation would be to build a Powershell script that handles the deletion, since that can do more complex checks like when the files/folders were last modified, etc. Use your Automate script to execute the Powershell script (once a week? nightly? whenever you like, if all of the date checking is in Powershell). Have it use Write-Output to dump any relevant information to the results variable (use the Execute Script function in Automate). You could have the script run a simple powershell query first to see if there are any applicable files and exit if not, create a ticket (if desired), etc. Share this post Link to post Share on other sites