mirror of
https://github.com/Corsinvest/cv4pve-api-powershell.git
synced 2026-04-25 12:15:48 +03:00
[GH-ISSUE #10] Module manifest needs PowerShellVersion attribute defined #8
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cv4pve-api-powershell#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
If using PowerShell Core 6.0, you'd change that line to this:
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
@franklupo commented on GitHub (Nov 9, 2023):
hi,
if you want create a PR with PowerShellVersion = '6.0'