Hello,
Can I in wsus prepare/export list of computer with particular windows version? For ex. I want to know which computers in ad have OS version below 21H2.
Tomasz.
Hello,
Can I in wsus prepare/export list of computer with particular windows version? For ex. I want to know which computers in ad have OS version below 21H2.
Tomasz.
Hello Tomasz,
It seems that there are no updates of the case. Please be kind to accept the right answer if the below answers are helpful. Or keep us in touch if there are any qiestions of the case.
Thanks for your time and wish you have a great day.
Best regards,
Rita
@T-0885
Thanks for your posting on Q&A.
We could run the below PowerShell script in DC and print the OperatingSystemVersion to identify the OS version. Here is a screenshot in my lab for your reference:
Get-ADComputer -SearchBase 'OU=US,DC=msnoob,DC=com' -Filter * -Properties * | FT Name, OperatingSystem, OperatingSystemServicePack, OperatingSystemVersion -Wrap -Auto
We have to import the Active Directory Module for Windows PowerShell with the following command before running the above script to query the OS Version:
Import-Module activedirectory
Best regards,
Rita
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Thanks for your post ! Could you also advise how export results to file? I add out-file C:\temp\kompy.txt -Append at end but it print nothing
$data = Get-ADComputer -SearchBase 'OU=test,DC=test,DC=local' -Filter -Properties | FT Name, OperatingSystem, OperatingSystemServicePack, OperatingSystemVersion -Wrap -Auto
if($data){
out-file C:\temp\kompy.txt -Append
}
Please try the following PowerShell script:
Get-ADComputer -Filter -Properties | FT Name, OperatingSystem, OperatingSystemServicePack, OperatingSystemVersion -Wrap -Auto | Out-File -FilePath C:Temp\file.txt
Note that remember to create a new folder named Temp included a txt file named with file.txt in the following path before you run the above command:
C:\Windows\System32
Reference screenshots:



Hope the above will be helpful. Don't forget to accept the answer if the above is helpful :)
Have a great day.
Regards,
Rita
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. [2]: /answers/storage/attachments/200872-198.png
Thanks for your time and help !
Have a nice day!
It is my pleasure. Please keep us in touch if you have any other questions. Please don't forget to accept the answer if the above answer is helpful. It will be helpful for others who have the same issue.
Have a great day :)
Best regards,
Rita
5 people are following this question.