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

pwshlib : Missing support for PowerShell 7

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Done
    • None
    • None
    • powershell
    • None
    • All Puppet Environments

    • Needs Assessment
    • Needs Assessment

    Description

      Basic Info
      Module Version: 0.8.0
      Puppet Version: N/A
      OS Name/Version: Windows

      Have got PowerShell 7 installed on the machine but unable to use pwsh as an exec provider. I get the message "No pwsh discovered!"

      Desired Behavior:

      Able to run Exec resources leveraging PowerShell 7

      exec { 'testing pwsh7':
          command  => '$PSVersionTable | Out-File -Path C:/test.txt',
          creates  => 'C:/test.txt'
          provider => pwsh,
      }
      

      Should create a file called c:/test.txt and have the Powershell version info in it.

      Actual Behavior:

      Get error messages in the Puppet Enterprise console and in puppet runs saying

      No pwsh discovered!

      Attachments

        Activity

          People

            Unassigned Unassigned
            n3snah Ross Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support