VMware Horizon Community
nary4484
Enthusiast
Enthusiast

[Horizon 7] Want to automate restart VM's for entire pool daily

Looking for suggestions on the best way to automate having an entire pool refresh or restart on a daily basis. They are kiosk type machines that auto-connect and are up 24x7.

VMware Horizon View Desktop Refresh Scheduled Task | Chronicles of V-Man

Am considering implementing a process similar to the link above.  Would like to hear others thoughts on the best way to do this.

7 Replies
jrodsguitar
Enthusiast
Enthusiast

Why reinvent the wheel good find. The method you found is very straight forward and easy to setup.

Blog: https://powershell.house/
0 Kudos
Magneet
Hot Shot
Hot Shot

I believe you also asked this on reddit or isn't that you? I would do it straight from vcenter or maybe pull the vm's from view first and then reboot from vcenter. It can also be done with the api's but I would need to dive into that before I can give any code.

0 Kudos
jrodsguitar
Enthusiast
Enthusiast

Magneet Or he can use the excellent example he already posted! Why re-invent the wheel. Work smarter not harder.

Blog: https://powershell.house/
0 Kudos
Magneet
Hot Shot
Hot Shot

because that's using the old powershell for view that only works from the connection server. You want to run script from a central scripting server and not from machines all over the place.

0 Kudos
jrodsguitar
Enthusiast
Enthusiast

You're mistaken in that the view powershell snapin only works from the connection server. He can utilize implicit remoting from a central server to import the session / module from the connection server. I've been doing that for years, it's old news.

Blog: https://powershell.house/
0 Kudos
nary4484
Enthusiast
Enthusiast

It is a good example and does still work!  However, after some digging around I have decided to complete this task via a Scheduled Task GPO.

jrodsguitar
Enthusiast
Enthusiast

Perfect solution Smiley Happy

Blog: https://powershell.house/
0 Kudos