Skip to content

Instantly share code, notes, and snippets.

@virtualhobbit
Created November 6, 2020 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save virtualhobbit/5cd031db9c62d6d27da7b01ebdb1c2c1 to your computer and use it in GitHub Desktop.
Save virtualhobbit/5cd031db9c62d6d27da7b01ebdb1c2c1 to your computer and use it in GitHub Desktop.
recompose_pool:
stage: recompose
tags:
- windows
script:
- Write-Host "Connecting to Horizon"
- Connect-HVServer -Server $cs -User $csUser -Password $csPass -Domain $csDomain
- Write-Host "Refreshing Horizon Pool"
- Start-HVPool -Pool $poolName -Recompose -LogoffSetting FORCE_LOGOFF -ParentVM "$packer_vmName" -SnapshotVM "Created by Packer" -StopOnFirstError $true
- Write-Host "Disconnecting to Horizon"
- Disconnect-HVServer -Server $cs -Confirm:$false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment