Feature AD-Domain-Services -IncludeManagementTools' returned 1: Install-WindowsFeature : Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer.
Contact Microsoft Customer Support Services.
At line:1 char:30
Feature AD-Domain-Services -IncludeManagementTools' returned 1: Install-WindowsFeature : Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer.
Contact Microsoft Customer Support Services.
At line:1 char:30
This is due to PowerShell attempting to display a progress bar to a non-interactive connection. Setting $ProgressPreference='SilentlyContinue' prior to the call to Install-WindowsFeature will resolve the problem. I suspect the same issue occurs during Uninstall-WindowsFeature as well, and that call will also need the progress bar to be bypassed.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
windowsfeature { 'AD-Domain-Services': ensure => present, installmanagementtools => true, }
What are you seeing
Feature AD-Domain-Services -IncludeManagementTools' returned 1: Install-WindowsFeature : Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer. Contact Microsoft Customer Support Services. At line:1 char:30
What behaviour did you expect instead
AD-DomainServices feature installed without error
Output log
Feature AD-Domain-Services -IncludeManagementTools' returned 1: Install-WindowsFeature : Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer. Contact Microsoft Customer Support Services. At line:1 char:30
Any additional information you'd like to impart
This is due to PowerShell attempting to display a progress bar to a non-interactive connection. Setting $ProgressPreference='SilentlyContinue' prior to the call to Install-WindowsFeature will resolve the problem. I suspect the same issue occurs during Uninstall-WindowsFeature as well, and that call will also need the progress bar to be bypassed.