Skip to content

Instantly share code, notes, and snippets.

@BustedSec BustedSec/ps1
Created Nov 3, 2015

What would you like to do?
Check for missing network shares
$bod = "Please investigate"
$Computers = Get-Content 'e:\scripts\servers.txt'
Foreach ($PCname in $Computers)
if (test-path $pcname)
{Send-MailMessage -SmtpServer -From -To -Subject "$PCname missing network shares" -Body $bod}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.