Dan White Posted July 11 Posted July 11 In the on-premises version of Horizon, we have the luxury of having the PowerCLI module to automate the infrastructure. This was particularly helpful when you have to publish dozens of manual applications. Is there anyway to extend this functionality to the cloud version? The current PowerCLI connections require a connection server, which we don't have in the cloud version. Is there a fast way to publish and assign 50ish manual applications quickly? Thx, Dan 1
Employee Nguyen Kim Posted July 12 Employee Posted July 12 Hi Dan, hope you are doing well today. Horizon Nextgen is built with API focus, you should be able to do all of that via API. Please refer to the link below for more info: https://developer.omnissa.com/horizon/apis/horizon-cloud-nextgen/#api 1 Nguyen Kim | Adoption Product Manager
Dan White Posted July 15 Author Posted July 15 Thanks for the reply. I was aware of the API documentation. I am not a developer, so I was hoping for an example of how to leverage the API with PowerShell
Solution Dan White Posted July 16 Author Solution Posted July 16 Hopefully this will help someone in the future. I found this article that had an example of how to access the REST API from PowerShell: https://techzone.omnissa.com/blog/getting-started-horizon-cloud-service-next-gen-supported-rest-apis-powershell Here is a basic script that I have that will return information on the pools: #Authenticate $Url = "https://connect.omnissa.com/csp/gateway/am/api/auth/api-tokens/authorize" $APIToken = "YOUR API TOKEN HERE" #Expires every 6 months $params = @{refresh_token = $APIToken} $Connection = Invoke-WebRequest $url -Method Post -Body $params -UseBasicParsing | ConvertFrom-Json $Token = $Connection.access_token #Setup Headers $Headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $Headers.Add("Authorization", "Bearer $Token") $Headers.Add("Accept","application/json, text/plain, */*") #Get Pool Data $Url = "https://cloud.vmwarehorizon.com/portal/v2/pools" $Pools = Invoke-WebRequest $url -Method Get -Headers $Headers -UseBasicParsing | ConvertFrom-Json $pools.content | Select name,DisplayName,Type It's disappointing that the code insertion feature of this forum doesn't support PowerShell 😞 As stated above, here is the link to the full REST API documentation: https://developer.omnissa.com/horizon/apis/horizon-cloud-nextgen/#api Hope that helps 2
Dan White Posted September 16 Author Posted September 16 It appears that this document is outdated: https://techzone.omnissa.com/blog/getting-started-horizon-cloud-service-next-gen-supported-rest-apis-powershell and this API list does not exist anymore: https://developer.omnissa.com/horizon/apis/horizon-cloud-nextgen/#api Can someone from Omnissa point me in the right direction? My end goal is to be able to publish manual applications via powershell. Thx, Dan
Sean Massey-1 Posted September 17 Posted September 17 Hi Dan, Here is the link to the Horizon Cloud REST API page: https://developer.omnissa.com/horizon-apis/horizon-cloud-nextgen/ Sean Massey Independent Consultant/Analyst/Blogger | VCDX-EUC 247 Vice Chairman of the Board - World of EUC Blog: thevirtualhorizon.com Mastodon: @seanpmassey@vmst.io Instagram/Thread: @seanpmassey LI: https://www.linkedin.com/in/seanpmassey/
Dan White Posted September 18 Author Posted September 18 Hi Sean, I appreciate the response but that site doesn't have the actual API documentation of which Methods are available and how to use them.
Sean Massey-1 Posted September 18 Posted September 18 2 minutes ago, Dan White said: Hi Sean, I appreciate the response but that site doesn't have the actual API documentation of which Methods are available and how to use them. I see them when I scroll down that page I linked above. Sean Massey Independent Consultant/Analyst/Blogger | VCDX-EUC 247 Vice Chairman of the Board - World of EUC Blog: thevirtualhorizon.com Mastodon: @seanpmassey@vmst.io Instagram/Thread: @seanpmassey LI: https://www.linkedin.com/in/seanpmassey/
Dan White Posted September 18 Author Posted September 18 Ha! They just updated that page after I posted my comment. I do see it now. Thx!
Ivan de Mes Posted September 30 Posted September 30 (edited) @Dan White I'm a bit late to the party, but here is also a getting started blog that I created a while ago. It contains links to various chapters. VMware Horizon Cloud Service Next-Gen - The Automation Series - Intro - IVANDEMES Edited September 30 by Ivan de Mes Ivan de Mes EUC Architect @ Orange Business (The Netherlands ) EUC Expert | vExpert | Blogger | Public Speaker | Part of the Dutch vEUC TechCon leadership team Blog: https://ivandemes.com | X: @ivandemes | LinkedIn: ivandemes
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now