Skip to content

enable_winrm_access does not seem to work #41

@rreilly-edr

Description

@rreilly-edr

Describe the bug
Using packer to create an image, apply hardening cookbook and enable_winrm_acesss and reboot
Expected behavior
Winrm is available after reboot

Actual behavior
after reboot winrm is no longer available

edr-widows-2016-base-20190228-074531: Recipe: windows-hardening::enable_winrm_access
edr-widows-2016-base-20190228-074531:   * powershell_script[Remote Management] action run[2019-02-28T15:53:42+00:00] INFO: Processing powershell_script[Remote Management] action run (windows-hardening::enable_winrm_access line 10)
2019/02/28 07:53:41 [INFO] (telemetry) ending chef-client
2019/02/28 07:53:41 [INFO] (telemetry) Starting provisioner windows-restart
==> edr-widows-2016-base-20190228-074531: Restarting Machine
2019/02/28 07:53:41 [INFO] 0 bytes written for 'stdout'
2019/02/28 07:53:41 [INFO] 0 bytes written for 'stderr'
2019/02/28 07:53:41 packer: 2019/02/28 07:53:41 Retryable error: http response error: 401 - invalid content type

After the 10 minute timeout packer exits as winrm does not become available.
Example code


OS / Environment
aws windows 2016 base
Chef Version

14.10.9

Cookbook Version

0.9.1

I also attempt to connect to the host via telnet ip 5985 and I cannot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions