[GH-ISSUE #10] Module manifest needs PowerShellVersion attribute defined #8

Closed
opened 2026-02-26 17:32:04 +03:00 by kerem · 1 comment
Owner

Originally created by @AngelusMortiel on GitHub (Nov 7, 2023).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/10

What happened?

I installed and attempted to import this module via PowerShell ISE (which uses the older Windows PowerShell 5.1). This failed with multiple errors of missing types or incorrect language syntax.

This is an easy fix by updating this line in the manifest to whatever the minimum version being used by the dev team.

# Minimum version of the PowerShell engine required by this module
# PowerShellVersion = ''

If using PowerShell Core 6.0, you'd change that line to this:

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '6.0'

Happy to create a PR for this, although I don't know what version is being used by your team.

However, some food for thought: Any scripting I've done that resolves around potential server infrastructure management (such as managing a hypervisor), I specifically code with a "lowest common denominator" approach to avoid having to install any unnecessary (and potantially vulnerable) applications on servers, writing modules specifically using the 5.1 PowerShell engine (I connect my VS Code to a Windows VM with a VS Code server installed, for example).

Expected behavior

Importing the module in ISE should have failed with the message that I was running too low a version of PowerShell.

Relevant log output

No response

Proxmox VE Version

8.0.4

Version (bug)

8.0.4

Version (working)

No response

On what operating system are you experiencing the issue?

Windows

Pull Request

  • I would like to do a Pull Request
Originally created by @AngelusMortiel on GitHub (Nov 7, 2023). Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/10 ### What happened? I installed and attempted to import this module via PowerShell ISE (which uses the older Windows PowerShell 5.1). This failed with multiple errors of missing types or incorrect language syntax. This is an easy fix by updating this line in the manifest to whatever the minimum version being used by the dev team. ``` # Minimum version of the PowerShell engine required by this module # PowerShellVersion = '' ``` If using PowerShell Core 6.0, you'd change that line to this: ``` # Minimum version of the PowerShell engine required by this module PowerShellVersion = '6.0' ``` Happy to create a PR for this, although I don't know what version is being used by your team. However, some food for thought: Any scripting I've done that resolves around potential server infrastructure management (such as managing a hypervisor), I specifically code with a "lowest common denominator" approach to avoid having to install any unnecessary (and potantially vulnerable) applications on servers, writing modules specifically using the 5.1 PowerShell engine (I connect my VS Code to a Windows VM with a VS Code server installed, for example). ### Expected behavior Importing the module in ISE should have failed with the message that I was running too low a version of PowerShell. ### Relevant log output _No response_ ### Proxmox VE Version 8.0.4 ### Version (bug) 8.0.4 ### Version (working) _No response_ ### On what operating system are you experiencing the issue? Windows ### Pull Request - [X] I would like to do a Pull Request
kerem closed this issue 2026-02-26 17:32:05 +03:00
Author
Owner

@franklupo commented on GitHub (Nov 9, 2023):

hi,
if you want create a PR with PowerShellVersion = '6.0'

<!-- gh-comment-id:1804113838 --> @franklupo commented on GitHub (Nov 9, 2023): hi, if you want create a PR with **PowerShellVersion = '6.0'**
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-api-powershell#8
No description provided.