ticketmaster / poshspec

Infrastructure Testing DSL running in Pester
MIT License
183 stars 32 forks source link

Add a 'Feature' test function #2

Closed cdhunt closed 7 years ago

cdhunt commented 8 years ago

Test for a Windows Feature.

From: @JuergSteiger @iainbrighton

devblackops commented 7 years ago

I can take this one. The question is should this work for both desktop and server OSes?

This article explains nicely the different ways to get/install features. https://peter.hahndorf.eu/blog/WindowsFeatureViaCmd.html

The methods to get/install features as well as some of the feature names are different between desktop and server. Supporting both platforms may lead to confusion when attempting to run the same Pester script on server and desktop and finding that it doesn't work.

When admins think of Windows features, I'm guessing they probably think of the feature names found in *-WindowsFeature (Server Manager/RSAT) and not the ones in *-WindowsOptionalFeature (DISM). http://serverfault.com/questions/713187/powershell-install-windowsfeature-and-family-missing-on-windows-10

My vote would be to use Get-WindowsFeature and only support Server 2008 R2 and above.

Thoughts?

cdhunt commented 7 years ago

How about we just disambiguate the function and call it ServerFeature and leave an open space for possibly an OptionalFeature in the future. Better? Worse?

devblackops commented 7 years ago

I'm good with that approach as well.

michaeltlombardi commented 7 years ago

This should've been closed by #38.

cdhunt commented 7 years ago

Closing this issue. If there is a desire to implement a similar function for Windows Optional Feature, please open a new issue. Thank you, everyone, for your contributions.