Hi,
i am trying to find a way to set the vlan on a AOS switch with rest.
First of all the login on the switch with my rest method works fine and i get a loogin success
$Cookie = Invoke-RestMethod -Uri $loginUrl -Method POST -Body $payload_login
$payload_login contains User and password.
0006:00:00:00.15 rest mrest_ctrl:Username =admin
0006:00:00:00.20 rest mrest_ctrl:role =2
0006:00:00:00.25 rest RestSrv-2:Method = POST, URI = /rest/v3/login-sessions
0006:00:00:00.33 rest RestSrv-2:Login successful for user admin
Now i´m facing a problem with the secound post.
When i try to post the new configuration i always get this message:
rest mrest_ctrl: PARSE header Cookie value : (null)
From my point of few there is a problem with the header in the post.
Can someone show me how to bind the values from the authentication cookie correkt to the header cookie?
I have tried it like this
$Headers = @{
"name" = $Cookie.name
"uri" = $Cookie.uri
"value" = $Cookie.cookie
}
but without sucess.
Thank you