Active Directory
--
Questions
--
Followers
Top Experts
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Or alternatively, in Active Directory if you create OU's based on OS then put all the PC's with Windows 2000 in that OU and apply the GPO to only this OU.
http://computerperformance.co.uk/vbscript/wmi_filter.htm
However, as you mentioned that the script should run only if the OS is Windows 2000, for that below mentioned is the code.
Root\CimV2; Select * from Win32_OperatingSystem where Caption = "Microsoft Windows 2000 Server"
above mentioned script says that, Only target computers running Windows XP Professional will have this script running on it.
Please let me know if you need further assistance on this.
Regards,
Vikas Shah






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
If not, you could apply a filter such as:
Namespace: root\CIMV2
Select * from WIN32_OperatingSystem where Version<5.1
Version 5.1 is XP, so anything XP and beyond will not apply this GPO. The pre XP/2003 machines will ignore the filter and apply the GPO.
You can create a WMI filter using GPMC (right click 'WMI Filters' | New)
So you could write a filter based on the build number, the build number of Windows 2000 is 2195 http://support.microsoft.c
WMI filter would be
SELECT * FROM Win32_OperatingSystem WHERE BuildNumber = 2195
The GPO will only apply if the WMI filter evaluates to TRUE. So for your XP, 2003, and Vista boxes it would be false and not apply.
Thanks
Mike
If you only have a small number of machines, you could put them in a security group and apply security filtering to the GPO so that it only applies to this group on machines. Or if the current structure allows, you could segregate them into an OU and apply the GPO to this.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
SELECT * FROM Win32_OperatingSystem WHERE BuildNumber = '2195'
Active Directory
--
Questions
--
Followers
Top Experts
Active Directory (AD) is a Microsoft brand for identity-related capabilities. In the on-premises world, Windows Server AD provides a set of identity capabilities and services, and is hugely popular (88% of Fortune 1000 and 95% of enterprises use AD). This topic includes all things Active Directory including DNS, Group Policy, DFS, troubleshooting, ADFS, and all other topics under the Microsoft AD and identity umbrella.