Jump to content
Updated Privacy Statement

prasant chettri1709159516

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by prasant chettri1709159516

  1. On ‎6‎/‎29‎/‎2017 at 6:46 AM, Randy White1709153608 said:

    I wanted to know what machines were in maintenance mode in a certain delivery group. 

     

     

    $machines = (Get-BrokerMachine -AdminAddress $adminaddress -DesktopGroupName $deliverygroup | Select-Object Hostedmachinename).hostedmachinename
     
    foreach($machine in $machines){
     
        $machinelist = Get-BrokerMachine -HostedMachineName $machine
            if($machinelist.InMaintenanceMode -eq $true){
                write-host "$machine is in maintenance mode"
                }else  {
                write-host "$machine is not in maintenance mode"
                }
     
        }

    It seemed to be working but I wonder how does the variable $machine gets its value. I don't see any input for $machine only see it for $machineS. Tried the same process for user account and it started throwing error with $user

×
×
  • Create New...