VMware Cloud Community
CRad14
Hot Shot
Hot Shot
Jump to solution

Can't find Horizon API Method

Looking for the Machine_assignusers() method per :https://vdc-download.vmware.com/vmwb-repository/dcr-public/93e1f7c4-fae6-4e10-b3be-7c73720b4589/2f59...

It says it is on the VMware.Hv.Machine object... when I look at the object I don't see that method

I just updated Connection server to 7.12. Any thoughts?

Conrad www.vnoob.com | @vNoob | If I or anyone else is helpful to you make sure you mark their posts as such! πŸ™‚
Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
CRad14
Hot Shot
Hot Shot
Jump to solution

Hey Magneet,

Thanks for the quick response, I appreciate it. I had seen that blog, however I am specifically trying to use the method list in the link I posted....A picture I posted in my first post didn't get added....

Horizonmethods.JPG

Although the blog post you linked to would solve my problem, I was hoping not to use it as it would complicate the script I am trying to write.

Fortunate, or unfotunately, this was a scenario of as soon as I posted the question and asked for help I immediately solved it.

It turns out that although I had update the Connection server to the correct version to use the method machine_assignuser().....I hadn't update the PowerCLI module. After I did that update and restarted powercli/powershell it showed up

horizonmethod.JPG

Thanks again for your reply. I appreciate it.

Conrad www.vnoob.com | @vNoob | If I or anyone else is helpful to you make sure you mark their posts as such! πŸ™‚

View solution in original post

Reply
0 Kudos
3 Replies
Magneet
Hot Shot
Hot Shot
Jump to solution

ALready send you the link on Slack but check this post: https://www.retouw.nl/2018/01/11/adding-manual-desktops-in-horizon-view-and-assigning-them-using-pow...

So technically what you could do when you purely want to use the api is to use the machineservice helper. My lab is down now but it's a nephew of the desktopservice helper that I use in this blog post: https://www.retouw.nl/2019/12/17/horizonapichanging-the-amount-of-desktops-or-rds-hosts-in-a-pool-fa...

Reply
0 Kudos
CRad14
Hot Shot
Hot Shot
Jump to solution

Hey Magneet,

Thanks for the quick response, I appreciate it. I had seen that blog, however I am specifically trying to use the method list in the link I posted....A picture I posted in my first post didn't get added....

Horizonmethods.JPG

Although the blog post you linked to would solve my problem, I was hoping not to use it as it would complicate the script I am trying to write.

Fortunate, or unfotunately, this was a scenario of as soon as I posted the question and asked for help I immediately solved it.

It turns out that although I had update the Connection server to the correct version to use the method machine_assignuser().....I hadn't update the PowerCLI module. After I did that update and restarted powercli/powershell it showed up

horizonmethod.JPG

Thanks again for your reply. I appreciate it.

Conrad www.vnoob.com | @vNoob | If I or anyone else is helpful to you make sure you mark their posts as such! πŸ™‚
Reply
0 Kudos
Magneet
Hot Shot
Hot Shot
Jump to solution

cool, from what I remember the assignusers was kinda bitchy so I didn't use it. You need to force feed the use ID as an array and not a single object.

Reply
0 Kudos