Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Errors during feature install on Windows 2019 #138

Closed
Andy-Adrian opened this issue Nov 16, 2020 · 0 comments · Fixed by #139
Closed

Errors during feature install on Windows 2019 #138

Andy-Adrian opened this issue Nov 16, 2020 · 0 comments · Fixed by #139

Comments

@Andy-Adrian
Copy link
Contributor

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.19.1
  • Ruby: 2.5.8p224
  • Distribution: Windows 2019
  • Module version: 3.2.3-RC0

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

  • ... verManager; Install-WindowsFeature AD-Domain-Services -IncludeManagem ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ReadError: (:) [Install-WindowsFeature], HostException
    • FullyQualifiedErrorId : ReadConsoleOutput,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand
      Error: /Stage[main]/Domain_controller/Windowsfeature[AD-Domain-Services]/ensure: change from 'absent' to 'present' failed:
      Execution of 'C:\Windows\system32\WindowsPowershell\v1.0\powershell.exe Import-Module ServerManager; Install-WindowsFeature 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
  • ... verManager; Install-WindowsFeature AD-Domain-Services -IncludeManagem ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ReadError: (:) [Install-WindowsFeature], HostException
    • FullyQualifiedErrorId : ReadConsoleOutput,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand

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

  • ... verManager; Install-WindowsFeature AD-Domain-Services -IncludeManagem ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ReadError: (:) [Install-WindowsFeature], HostException
    • FullyQualifiedErrorId : ReadConsoleOutput,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand
      Error: /Stage[main]/Domain_controller/Windowsfeature[AD-Domain-Services]/ensure: change from 'absent' to 'present' failed:
      Execution of 'C:\Windows\system32\WindowsPowershell\v1.0\powershell.exe Import-Module ServerManager; Install-WindowsFeature 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
  • ... verManager; Install-WindowsFeature AD-Domain-Services -IncludeManagem ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ReadError: (:) [Install-WindowsFeature], HostException
    • FullyQualifiedErrorId : ReadConsoleOutput,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant