Skip to content

Create a list of operation system and build version from active directory clients with powershell

So the task was a result of a short question of "Do you know if each windows client got their upgrade?".

It turned out that it was easy to ask this question in powershell to the active directory.

Get-ADComputer -Filter { (Enabled -eq $true) -and (OperatingSystem -notlike "*server*") } -Properties Name,OperatingSystem,OperatingSystemVersion,SID | Format-Table

But, as usual, this results in to much information. Quickly some features where requested. We want to:

  • put this question into a script to ask it in a well defined way over and over again
  • we want to reduced the amount of information
  • we want to be able to filter against operation system
  • we want to filter against build version if more than one build version exists
  • we want to put it to a csv file

I was able to set all feature requests to "done" and more or less, you can find the result here.

Translate to de es fr it pt ja