Skip to content

Instantly share code, notes, and snippets.

View lawndoc's full-sized avatar
🤓
Learning

C.J. May lawndoc

🤓
Learning
View GitHub Profile
@lawndoc
lawndoc / OS-Version-Sort-All.ps1
Last active July 1, 2021 03:29
Query AD for Windows Versions and Export to CSV
### Global Variables (edit these)
$DOMAIN = "DC=example,DC=com"
$CSVPATH = ".\\"
### Begin Script
$windowsXP = [System.Collections.ArrayList]@()
$windows7 = [System.Collections.ArrayList]@()
$windows10 = [System.Collections.ArrayList]@()
$server03 = [System.Collections.ArrayList]@()
$server08 = [System.Collections.ArrayList]@()