1

For one of my projects, I need a way to query which features/roles/role services are installed on a given Windows Server machine.

In it's grand tradition, Microsoft keeps reinventing stuff (sysocmgr in Windows 2003, pkgmgr and ocsetup in Windows 2008, dism in Windows 2012), making it hard to write OS-independent code.

I know for sure that there is an official native API for DISM (and a managed wrapper). Is there something for Windows 2003 and 2008?

Anton Gogolev
  • 113,561
  • 39
  • 200
  • 288

1 Answers1

0

WMI has the Server Feature Provider for Windows Server 2008 and above. If you're still running Windows Server 2003, it's out of support, and you really need to migrate.

Eric Brown
  • 13,774
  • 7
  • 30
  • 71
  • downvoter here, really, what good pushing migration does to this answer? I think "it's out of support." would be informative enough. – n611x007 Sep 24 '15 at 14:47
  • @naxa I'd recommend *anyone* running a 12 year old OS to migrate to something newer; be it windows, Linux, or BeOS. – Eric Brown Sep 24 '15 at 18:30
  • Well not that important really; My point is someone like the OP having both 2003 or 2008 must have the technical insight from the expertise so is a) either oblivious of the fact that support has gone from w2003 or b) already aware of special requirements that keep the 2003 one around. Thus to stress migration without explicit rational -apart from the widely unspecific umbrella term that it's out of support- is a) either superfluous b) inherently uninformed. That's why I think the answer would be better off without the last part and best ended at `it's out of support`. – n611x007 Sep 25 '15 at 09:44
  • @naxa Then write your own answer. – Eric Brown Sep 25 '15 at 16:27