Skip to content

Instantly share code, notes, and snippets.

Avatar

BustedSec BustedSec

  • BustedSec
  • Long Island, New York
View GitHub Profile
View gist:19f4b566481f8c2ebc595a7a5e484ecd
{
"logstash-2016.12.10": {
"aliases": {},
"mappings": {
"8": {
"properties": {
"@timestamp": {
"type": "date"
},
"@version": {
@BustedSec
BustedSec / ps1
Created Nov 3, 2015
Check for missing network shares
View ps1
$bod = "Please investigate"
$Computers = Get-Content 'e:\scripts\servers.txt'
Foreach ($PCname in $Computers)
{
if (test-path $pcname)
{$Pcname}
else
{Send-MailMessage -SmtpServer autodiscover.ecinfosystems.com -From my@email.com -To emailaddress@emailplace.com -Subject "$PCname missing network shares" -Body $bod}
}