Comments (6)
You have set the minimum version in file Corsinvest.ProxmoxVE.Api.psd1
. However in order to prevent the module from being installed on imcompatible PowerShell versions, I think you need to work with the #Requires
statement: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_requires?view=powershell-7.4
from cv4pve-api-powershell.
which version of powershell do you use?
Best regards
from cv4pve-api-powershell.
Same problem here. Tried downgrading to 8.0.4 with the same result. Version info see below. In case PowerShell 5.1 is not supported the module should be marked as such.
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.17763.5328
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.5328
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS > Connect-PveCluster -HostsAndPorts host.domain.com
Connect-PveCluster : The 'Connect-PveCluster' command was found in the module 'Corsinvest.ProxmoxVE.Api', but the module could not be loaded. For more information, run 'Import-Module Corsinvest.ProxmoxVE.Api'.
PS > Import-Module Corsinvest.ProxmoxVE.Api
At C:\Program Files\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\8.0.4\Corsinvest.ProxmoxVE.Api.psm1:236 char:42
+ ? $Parameters[$_] ? 1 : 0 `
+ ~
Unexpected token '?' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\8.0.4\Corsinvest.ProxmoxVE.Api.psm1:369 char:84
+ ... t = (($TemplateFile -as [System.Uri]).Scheme -match '[http|https]') ?
+ ~
Unexpected token '?' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\8.0.4\Corsinvest.ProxmoxVE.Api.psm1:370 char:63
+ (Invoke-WebRequest $TemplateFile).Content :
+ ~
Unexpected token ':' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\8.0.4\Corsinvest.ProxmoxVE.Api.psm1:458 char:59
+ $parameters = @{ proxy = $null -eq $PveTicket ? $PveTicke ...
+ ~
Unexpected token '?' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\8.0.4\Corsinvest.ProxmoxVE.Api.psm1:458 char:58
+ $parameters = @{ proxy = $null -eq $PveTicket ? $PveTicke ...
+ ~
The hash literal was incomplete.
At C:\Program Files\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\8.0.4\Corsinvest.ProxmoxVE.Api.psm1:474 char:1
+ }
+ ~
Unexpected token '}' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\8.0.4\Corsinvest.ProxmoxVE.Api.psm1:4 char:25
+ ... idateVmId : System.Management.Automation.IValidateSetValuesGenerator ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [System.Management.Automation.IValidateSetValuesGenerator].
At C:\Program Files\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\8.0.4\Corsinvest.ProxmoxVE.Api.psm1:8 char:27
+ ... ateVmName : System.Management.Automation.IValidateSetValuesGenerator ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [System.Management.Automation.IValidateSetValuesGenerator].
At C:\Program Files\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\8.0.4\Corsinvest.ProxmoxVE.Api.psm1:14 char:25
+ ... idateNode : System.Management.Automation.IValidateSetValuesGenerator ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [System.Management.Automation.IValidateSetValuesGenerator].
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
Import-Module : The module to process 'Corsinvest.ProxmoxVE.Api.psm1', listed in field 'ModuleToProcess/RootModule' of module manifest 'C:\Program
Files\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\8.0.4\Corsinvest.ProxmoxVE.Api.psd1' was not processed because no valid module was found in any module directory.
At line:1 char:1
+ Import-Module Corsinvest.ProxmoxVE.Api
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (Corsinvest.ProxmoxVE.Api:String) [Import-Module], PSInvalidOperationException
+ FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
from cv4pve-api-powershell.
Requitred minimum PowerShellVersion = '6.0'
from cv4pve-api-powershell.
News?
from cv4pve-api-powershell.
Fix in new release
best regards
from cv4pve-api-powershell.
Related Issues (14)
- Connect-PveCluster HOT 2
- Module manifest needs PowerShellVersion attribute defined HOT 1
- Parameter verification failed with 8.0.4 HOT 1
- Convert Hashtables into appropriate querystring values
- How to execute commands on VM via QEMU HOT 2
- Windows Specific command execution HOT 5
- Enter-PveSPice not found HOT 1
- Upid HOT 2
- Syntax requirement HOT 2
- Get-PveVm with -PveTicket parameter HOT 1
- Obscure error message at Copy-PveQemu HOT 2
- Start-PveVm is broken HOT 1
- Get-PveNodesQemuAgentExecStatus parameter transmission problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cv4pve-api-powershell.