Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente | |||
reseau:cloud:proxmox:apirestpowershell [2023/09/05 20:02] techer.charles_educ-valadon-limoges.fr [Ressources] |
reseau:cloud:proxmox:apirestpowershell [2023/09/05 20:11] (Version actuelle) techer.charles_educ-valadon-limoges.fr [Install du modulke POwershell] |
||
---|---|---|---|
Ligne 11: | Ligne 11: | ||
</ | </ | ||
+ | ===== Connexion au cluster ===== | ||
+ | * Connexion au cluster en indiquant compte et mùot de passe | ||
+ | <code powershell> | ||
+ | PS > Connect-PveCluster -HostsAndPorts 192.168.190.191: | ||
+ | PowerShell credential request | ||
+ | Proxmox VE Username and password, username formatted as user@pam, user@pve, user@yourdomain or user (default domain pam). | ||
+ | User: test | ||
+ | Password for user test: **** | ||
+ | #return Ticket, default set $Global: | ||
+ | #this is useful when connections to multiple clusters are needed use parameter -SkipRefreshPveTicketLast | ||
+ | HostName | ||
+ | Port : 8006 | ||
+ | SkipCertificateCheck : True | ||
+ | Ticket | ||
+ | OzhOd8ozEEQIK7Fw2lOSa0qBFUTZRoMtnCnlsjk/ | ||
+ | gjkDvu1P7lLjK9JxSzqnCWWD739DT3P3bW+Ac3SyVqTf8sw== | ||
+ | CSRFPreventionToken | ||
+ | |||
+ | #Connection to cluster using Api Token | ||
+ | PS / | ||
+ | HostName | ||
+ | Port : 8006 | ||
+ | SkipCertificateCheck : True | ||
+ | Ticket | ||
+ | CSRFPreventionToken | ||
+ | ApiToken | ||
+ | |||
+ | #For disable output call Connect-PveCluster > $null | ||
+ | |||
+ | #Get version | ||
+ | PS / | ||
+ | |||
+ | #$ret return a class PveResponse | ||
+ | |||
+ | #Show data | ||
+ | PS / | ||
+ | repoid | ||
+ | ------ | ||
+ | d0ec33c6 15 it 5.4 | ||
+ | |||
+ | #Show data 2 | ||
+ | PS / | ||
+ | repoid | ||
+ | ------ | ||
+ | d0ec33c6 15 it 5.4 |