Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-5228

Powershell : Execs fail with InvalidArgument: [Invoke-Expression] ParameterBindingException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: powershell
    • Labels:
      None
    • Template:
      MODULES Bug Template
    • Team:
      Windows
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: Powershell 2.1.1
      Puppet Version: 4.9.4
      OS Name/Version: Windows 2012r2

      Describe your issue in as much detail as possible...
      Creating a manifest (exec.pp) with:

        exec { 'ExportSecurityPolicy':
          command  => 'secedit /export /cfg c:\windows\temp\secpol.cfg.orig',
          provider => powershell,
          creates  => 'c:/windows/temp/secpol.cfg.orig',
        }
      

      And trying to apply it with `puppet apply exec.pp` fails with the errors in the attachment.
      Doing the same with running hte command in the exec in a powershell window works.

      Debug run log attached.

      Resolution: I could get things to work again by downgrading to version 2.0.3 of the module.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              qa qa
              Reporter:
              carthik Carthik Sharma
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support