Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $App_server = "Seq-prod-01" ## Name of the Seqeuncer server on which we install the applications and create the layers
- $App_name = 'Firefox' ## Application name
- ### Get new app volume GUID
- $App = ((Invoke-WebRequest -WebSession $Login -Method get -Uri "http://$server/cv_api/appstacks").content | convertFrom-Json) | Where-Object {$_.name -eq $App_name}
- $Appid = $App.id
- ### Get provisioning server ID
- $Provisioner = ((Invoke-WebRequest -WebSession $Login -Method get -Uri "http://$server/cv_api/machines").content | convertFrom-Json).Machines | Where-Object {$_.name -eq $App_server}
- $Provisionerid = $Provisioner.id
- $Provisioneruuid = $Provisioner.identifier
- ### Start Provisioning
- start-sleep 10
- Invoke-WebRequest -WebSession $Login -Method Post -Uri "http://$server/cv_api/provisions/$Appid/start?computer_id=$Provisionerid&uuid=$Provisioneruuid" | out-null
- start-sleep 15
Advertisement
Add Comment
Please, Sign In to add comment