No announcement yet.

Help with restart VM in powershell

  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with restart VM in powershell

    Hi All,

    I am trying to solve a powershell project myself but this one requires some skill i dont have (yet).

    Project description:


    We have 100+ users, which uses our vmware view horizon server and connect to get a client they can work on.


    The environment is used 24/7 by the people all around the country.
    On our Vmware View Horizon server, sometimes the virtual machines ”hangs” in a shutdown state or just stalls and therefore the users CANT access their thin client.!

    No one outside the IT-department can RESTART the machine.
    Wanted solution:

    The task is to make a powershell script for users to able to see their OPEN sessions and then have a button ”RESTART” beside each session or similar

    if there is more than one session which hangs.

    ----------------------- pseudo-code -----------------------------

    get all remote-sessions

    Show remote-sessions with a RESTART option for each session


    Can anyone help me with this?


  • #2
    Re: Help with restart VM in powershell

    Removed from VMware Forum as this asks a Powershell question.
    Joined: 23rd December 2003
    Departed: 23rd December 2015


    • #3
      Re: Help with restart VM in powershell

      I would start by looking here


      • #4
        Re: Help with restart VM in powershell

        I think your time might be better served trying to solve the root problem. While you could create a PowerShell script there are a number of hurdles you have to clear. This would require access to the PowerCLI cmdlets which means they have to be installed on every client desktop, or you need to create a remoting setup where the clients run the command on a central server. I suppose the benefit with this approach is that the user can connect with alternate credentials. But packaging something securely with alternate credentials requires 3rd party software. And none of this is going to be easy if you have never seen PowerShell before.

        I'd say figure out the problem.