Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Script to Verify PST Backups on our NAS

$
0
0

Hi Everyone,

So my boss has tasked me with writing my first PowerShell script and I'ma little stuck (I've been researching as best I can). I need to write a script which checks our NAS and sends an email to users who haven't backed up their email in the last 8 days. Some users have old archives which haven't been touched in a long time so I can't just put in the path of the server -r as it will be sending emails to the users for these old archives also. Here is what I have so far, any guidance would be greatly appreciated.

Powershell
$time=(Get-Date).AddDays(-8)$path="\\nas03\Backup\Client_PST\user0",`"\\nas03\Backup\Client_PST\user1",`"\\nas03\Backup\Client_PST\user2",`"\\snas03\Backup\Client_PST\user3",`"\\nas03\Backup\Client_PST\user4",`Get-ChildItem-Path$path-Force|`Where-Object{$_.LastWriteTime-lt$time}



Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>