voxpupuli / puppet-windowsfeature

Library that uses ServerAdministration api that comes with Windows Server 2008 and Windows Server 2012 to add / remove windows features
https://forge.puppet.com/puppet/windowsfeature
MIT License
30 stars 49 forks source link

add Import-Module ServerManager for win2012r2 PS commands #110

Closed devcfgc closed 6 years ago

devcfgc commented 6 years ago

I've been testing all day on some win2012r2 machines:

devcfgc commented 6 years ago

I tested in windows server 2012 and in all cases, I needed to use Import-Module ServerManager; otherwise, I get an error that the module Get-WindowsFeature | Install-WindowsFeature | Uninstall-WindowsFeature couldn't be found. I don't have too much experience with porwershell but it seems that the \\system32\\WindowsPowershell\\v1.0\\powershell.exe can't use those commands without importing the servermanager module

vinzent commented 6 years ago

@devcfgc , thank you for your contribution !