mirror of
https://github.com/Corsinvest/cv4pve-api-powershell.git
synced 2026-04-25 12:15:48 +03:00
[GH-ISSUE #5] Syntax requirement #2
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#2
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 @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
@franklupo commented on GitHub (Apr 20, 2022):
Hi,
check the problem.
Best regards
@franklupo commented on GitHub (Apr 20, 2022):
Found the problem. I prepare the fix and release the new version.
Best regards