Recently Added

Notes & Bookmarks

  1. Quasars; power and metrics beyond all comprehension. Staggeringly beautiful information... and very well written.
  2. "I'm sorry. I can't come in today. Religious holiday. The feast of...Maximum Occupancy."pic.twitter.com/mkgxPWfNj2
  3. Verifying myself: I am sgnls on Keybase.io. UJa01G4v3YRJYB1LFjDRSf1Nh0bh1sOykCbq / https://keybase.io/sgnls/sigs/UJa01G4v3YRJYB1LFjDRSf1Nh0bh1sOykCbq
  4. Be sure to take care of your own infrastructure(s); purge dumps, tunnel and lock-down egress transit, encrypt and permission CORRECTLY!
  5. It really doesn't matter what else gets released; Sikth's 'The Future in Whose Eyes?' is THE album of 2017. #albumoftheyear @SikthOfficialpic.twitter.com/P5houdf1yx

Move Inactive Workstations to New OU

Updated : 14:43:00pm, 10th Mar 2016

Whilst this function is straightforward, you could of course do anything against the applicable objects (e.g. disable-adaccount);

import-module activedirectory

$inactive = (Get-Date).Adddays(-(180)) 

$comps = get-adcomputer -filter {LastLogonTimeStamp -lt $inactive} -properties * | select-object Name,@{Name="Stamp"; Expression={[DateTime]::FromFileTime($_.lastLogonTimestamp)}

foreach($comp in $comps){move-adobject $comp –targetpath “ou=Inactive Machines,dc=domain,dc=com”}

Run line by line, or save entire contents as inactive_machines.ps1.

SGNLS.net © 2006-2017

Comments, submissions and errors to desk[at]sgnls.net.

Material and content adheres to the Creative Commons (NC-SA 4.0) license.

v12.01151