Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add Import-Module ServerManager for win2012r2 PS commands #110

Merged
merged 3 commits into from
Dec 16, 2017

Conversation

devcfgc
Copy link
Contributor

@devcfgc devcfgc commented Dec 13, 2017

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

  • vagrant: I used this box MattHodge/Windows2012R2-WMF5-NOCM
  • azure VM
    Also tested with Powershell:
  • v 5.0
  • v 5.1
    In all my tests I need to add the Import-Module ServerManager; for the correct execution of the commands otherwise, some Powershell commands won't work.

@vinzent vinzent added the needs-feedback Further information is requested label Dec 16, 2017
Copy link
Contributor

@vinzent vinzent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what problem is fixed by this PR ?

@devcfgc
Copy link
Contributor Author

devcfgc commented Dec 16, 2017

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

Copy link
Contributor

@vinzent vinzent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://technet.microsoft.com/en-us/library/ff476071.aspx indicates the import is necessary for (Add|Get|Remove)-WindowsFeature cmdlets.

@vinzent vinzent added bug Something isn't working and removed needs-feedback Further information is requested labels Dec 16, 2017
@vinzent vinzent merged commit ef7bd75 into voxpupuli:master Dec 16, 2017
@vinzent
Copy link
Contributor

vinzent commented Dec 16, 2017

@devcfgc , thank you for your contribution !

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants