Skip to content

Instantly share code, notes, and snippets.

View micmaher's full-sized avatar

Michael Maher micmaher

  • Home
  • Dublin, Ireland
View GitHub Profile
@dotps1
dotps1 / WannaCryVulnerbilityTesting.ps1
Last active May 31, 2017 13:31
Test for WannaCry Vulns using PSJobs
#requires -module ActiveDirectory
# Input computers.
$threshold = (Get-Date).AddDays(-180)
$computers = Get-ADComputer -Filter { OperatingSystem -notlike "*server*" -and OperatingSystem -like "*windows*" -and PasswordLastSet -gt $threshold } |
Select-Object -ExpandProperty Name |
Sort-Object -Property Name
# Make sure there are not existing jobs.
Get-Job |