1

I am using MDT to deploy my computers and want to have it run a second task sequence when it hits the custom tasks stage. One thing is that i want to have Both Windows Home and Pro editions in the same task and have a WMI query select the correct folder to deploy. Both editions have different sets of tasks after deployment. What WMI query can i use to accomplish this?

  • Given the info here: https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-operatingsystem does OperatingSystemSKU help? – HelpingHand Jul 13 '19 at 12:10
  • Possible duplicate of [How do I determine if my system is Windows 10 using the command line?](https://superuser.com/questions/1075989/how-do-i-determine-if-my-system-is-windows-10-using-the-command-line) – Ramhound Jul 13 '19 at 22:37

1 Answers1

0

What WMI query can I use to accomplish this?

You need the Caption element of the Win32_OperatingSystem WMI class.

The following command demonstrates retrieving this using wmic:

wmic os get Caption | findstr /v Caption

Example output:

F:\test>wmic os get Caption | findstr /v Caption
Microsoft Windows 7 Home Premium

Further Reading

DavidPostill
  • 153,128
  • 77
  • 353
  • 394
  • Select * From Win32_OperatingSystem Where OperatingSystemSKU = Product_Professional I was looking along the lines of something similar to this but i am not good at coding WMI query's. Basically as this will be deployed to 7, 8, and 10 it would be easier if it just detected Home or Pro not Microsoft Windows 7 Home Premium. But if i can't get this to work then i will consider your method as a viable option. – Dudefoxlive Jul 13 '19 at 22:39
  • @Dudefoxlive As far as I know there is no way to specifically get "Home" vs "Professional". The closest I can find is to parse the "Caption" output ... – DavidPostill Jul 14 '19 at 08:28