Hi Mike,
Managed to pull some worthwhile data from my AD using this script below:
$date = (get-date).AddDays(-104)
get-adcomputer -filter { LastLogonDate -gt $date -and OperatingSystem -like "Windows 7*"} -prop LastLogonDate,OperatingSystem |
select name,lastlogondate,OperatingSystem,distinguishedname | Sort-Object lastlogondate | Export-Csv C:\Users\vwalker\Desktop\Win7Export\win7output.csv
It's not sorting my OU'S out, however it's giving me what I need, I'll manipulate the csv file and mess about with it and save as a excel doc to make it presentable...thankfully in my domain I only have approx 130 ish win 7 machines that are still on the network so the formatting of my spreadsheet wont be to bad...could be worse will 1000's of win 7 machine still on the network!!!
My head needs to sleep now it's getting late in Scotland thanks for all your help mike
Vincent