How to find Windows 10 computers in your AD OU that are out of support

Overview

  • This will show how to find which computers are running Windows 10 versions that are out of support.

Information

  • You will need to have the ActiveDirectory PowerShell module installed and enabled to use the code snippet below
  • To get a report of the Windows 10 and Windows Server 2016 computer accounts in your AD OU that are out of support as of May 3rd, 2018, open a normal (non-admin) PowerShell window and paste in the following code snippet.
ipmo activedirectory; get-adcomputer -filter {(((operatingsystemversion -like '*14393*') -and (OperatingSystem -like '*Windows 10 Pro*')) -or (((operatingsystemversion -like '*10240*') -or (operatingsystemversion -like '*10586*')) -and (-not (operatingSystem -like '*LTSB*') ))) } -searchbase ((get-aduser ((whoami).split("\")[1])).distinguishedname.split(",")[3..7] -join ",")  -Properties canonicalName,OperatingSystem,OperatingSystemVersion,passwordLastSet,LastLogonDate,Description| select-object @{name="ADLocation";expression= {$_.CanonicalName.substring(20)  }},@{name="Unit";expression={$_.canonicalName.split("/")[2]}},Enabled,OperatingSystem,OperatingSystemVersion,PasswordLastSet,lastLogonDate,Description |sort-object ADLocation | ft

Details

Article ID: 40612
Created
Tue 10/10/17 3:48 PM
Modified
Thu 5/24/18 3:37 PM