[GH-ISSUE #1] Connect-PveCluster #3

Closed
opened 2026-02-26 17:32:02 +03:00 by kerem · 2 comments
Owner

Originally created by @flaviol on GitHub (Oct 1, 2020).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/1

Why the Connect-PveCluster function was deleted from exported ?
It was replaced by another one or it is no longer used?
The correct way for using the module is
$Ticket = Connect-PveCluster...
... more calls of module functions with $Ticket as parameter

In Power shell 5.1 I'm not able to import it obtaining the followin error message.
DETTAGLIATO: Caricamento del modulo dal percorso 'C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psd1'.
DETTAGLIATO: Caricamento del modulo dal percorso 'C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1'.
In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:235 car:55

  •                 $Parameters[$_] = $Parameters[$_] ? 1 : 0
    
  •                                                   ~
    

Token '?' imprevisto nell'espressione o nell'istruzione.
In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:355 car:84

  • ... t = (($TemplateFile -as [System.Uri]).Scheme -match '[http|https]') ?
  •                                                                     ~
    

Token '?' imprevisto nell'espressione o nell'istruzione.
In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:356 car:63

  •                 (Invoke-WebRequest $TemplateFile).Content :
    
  •                                                           ~
    

Token ':' imprevisto nell'espressione o nell'istruzione.
In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:11 car:22

  • ... ValidVmId : System.Management.Automation.IValidateSetValuesGenerator ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

Impossibile trovare il tipo [System.Management.Automation.IValidateSetValuesGenerator].
In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:17 car:24

  • ... lidVmName : System.Management.Automation.IValidateSetValuesGenerator ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

Impossibile trovare il tipo [System.Management.Automation.IValidateSetValuesGenerator].
In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:23 car:22

  • ... ValidNode : System.Management.Automation.IValidateSetValuesGenerator ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

Impossibile trovare il tipo [System.Management.Automation.IValidateSetValuesGenerator].
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken

Import-Module : Impossibile elaborare il modulo 'Corsinvest.ProxmoxVE.Api.psm1' elencato nel campo 'ModuleToProcess/RootModule' del manifesto del modulo
'C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psd1'. Non sono stati trovati moduli validi in alcuna directory di moduli.
In riga:1 car:1

  • Import-Module C:\Users\xxx\Documents\WindowsPowerShell\Modules\Co ...
  •   + CategoryInfo          : ResourceUnavailable: (Corsinvest.ProxmoxVE.Api:String) [Import-Module], PSInvalidOperationException
      + FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    

Thank for the great work

Originally created by @flaviol on GitHub (Oct 1, 2020). Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/1 Why the Connect-PveCluster function was deleted from exported ? It was replaced by another one or it is no longer used? The correct way for using the module is $Ticket = Connect-PveCluster... ... more calls of module functions with $Ticket as parameter In Power shell 5.1 I'm not able to import it obtaining the followin error message. DETTAGLIATO: Caricamento del modulo dal percorso 'C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psd1'. DETTAGLIATO: Caricamento del modulo dal percorso 'C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1'. In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:235 car:55 + $Parameters[$_] = $Parameters[$_] ? 1 : 0 + ~ Token '?' imprevisto nell'espressione o nell'istruzione. In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:355 car:84 + ... t = (($TemplateFile -as [System.Uri]).Scheme -match '[http|https]') ? + ~ Token '?' imprevisto nell'espressione o nell'istruzione. In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:356 car:63 + (Invoke-WebRequest $TemplateFile).Content : + ~ Token ':' imprevisto nell'espressione o nell'istruzione. In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:11 car:22 + ... ValidVmId : System.Management.Automation.IValidateSetValuesGenerator ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Impossibile trovare il tipo [System.Management.Automation.IValidateSetValuesGenerator]. In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:17 car:24 + ... lidVmName : System.Management.Automation.IValidateSetValuesGenerator ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Impossibile trovare il tipo [System.Management.Automation.IValidateSetValuesGenerator]. In C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psm1:23 car:22 + ... ValidNode : System.Management.Automation.IValidateSetValuesGenerator ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Impossibile trovare il tipo [System.Management.Automation.IValidateSetValuesGenerator]. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : UnexpectedToken Import-Module : Impossibile elaborare il modulo 'Corsinvest.ProxmoxVE.Api.psm1' elencato nel campo 'ModuleToProcess/RootModule' del manifesto del modulo 'C:\Users\xxx\Documents\WindowsPowerShell\Modules\Corsinvest.ProxmoxVE.Api\Corsinvest.ProxmoxVE.Api.psd1'. Non sono stati trovati moduli validi in alcuna directory di moduli. In riga:1 car:1 + Import-Module C:\Users\xxx\Documents\WindowsPowerShell\Modules\Co ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (Corsinvest.ProxmoxVE.Api:String) [Import-Module], PSInvalidOperationException + FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand Thank for the great work
kerem closed this issue 2026-02-26 17:32:03 +03:00
Author
Owner

@franklupo commented on GitHub (Oct 1, 2020):

HI,
the first is an error. Im using PowerShell 7.1

Best regards

<!-- gh-comment-id:702142045 --> @franklupo commented on GitHub (Oct 1, 2020): HI, the first is an error. Im using PowerShell 7.1 Best regards
Author
Owner

@franklupo commented on GitHub (Oct 9, 2020):

News?

<!-- gh-comment-id:706252217 --> @franklupo commented on GitHub (Oct 9, 2020): News?
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#3
No description provided.