[GH-ISSUE #5] Syntax requirement #2

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

Originally created by @videlicetIHOPE on GitHub (Apr 19, 2022).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/5

hello,
Unable to write a satisfying request in powershell, equivalent to a pvesh command

====================

For an api request with pvesh
pvesh set /nodes/precision/qemu/105/config -ipconfig0 "ip=10.1.1.21/24,gw=10.1.1.254"

Result
update VM 105: -ipconfig0 ip=10.1.1.21/24,gw=10.1.1.254

================

But with powershell

==================
$ipval=@{}
$ipval[0]="ip=10.1.1.21/24,gw=10.1.1.254"
PS C:\Users\user\Desktop> set-PveNodesQemuConfig -vmid 105 -Node proxserver -IpconfigN $ipval

StatusCode : 400
IsSuccessStatusCode : False
Response :
ReasonPhrase : Parameter verification failed.
RequestResource : /nodes/proxserver/qemu/105/config
Parameters : {ipconfig0}
Method : Put
ResponseType : json

========================

Sorry if i made a basic error with PS, I am not very familiar.

perhaps add an example with Hashtables to the doc.
thank you,
Best regards,
ken

Originally created by @videlicetIHOPE on GitHub (Apr 19, 2022). Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/5 hello, Unable to write a satisfying request in powershell, equivalent to a pvesh command ==================== For an api request with pvesh pvesh set /nodes/precision/qemu/105/config -ipconfig0 "ip=10.1.1.21/24,gw=10.1.1.254" Result update VM 105: -ipconfig0 ip=10.1.1.21/24,gw=10.1.1.254 ================ But with powershell ================== $ipval=@{} $ipval[0]="ip=10.1.1.21/24,gw=10.1.1.254" PS C:\Users\user\Desktop> set-PveNodesQemuConfig -vmid 105 -Node proxserver -IpconfigN $ipval StatusCode : 400 IsSuccessStatusCode : False Response : ReasonPhrase : Parameter verification failed. RequestResource : /nodes/proxserver/qemu/105/config Parameters : {ipconfig0} Method : Put ResponseType : json ======================== Sorry if i made a basic error with PS, I am not very familiar. perhaps add an example with Hashtables to the doc. thank you, Best regards, ken
kerem closed this issue 2026-02-26 17:32:03 +03:00
Author
Owner

@franklupo commented on GitHub (Apr 20, 2022):

Hi,
check the problem.

Best regards

<!-- gh-comment-id:1104076050 --> @franklupo commented on GitHub (Apr 20, 2022): Hi, check the problem. Best regards
Author
Owner

@franklupo commented on GitHub (Apr 20, 2022):

Found the problem. I prepare the fix and release the new version.

Best regards

<!-- gh-comment-id:1104125141 --> @franklupo commented on GitHub (Apr 20, 2022): Found the problem. I prepare the fix and release the new version. Best regards
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#2
No description provided.