The nice thing about Powershell and the modules7API to other technologies is that you can do simple queries and have a big effect.
The following example starts a service for specified machines in a Citrix 7.x environment.
1 2 3 4 5 6 7 8 9 10 |
#by J.Kühnis 06.03.2019 Add-PSSnapin * $machines = (Get-BrokerMachine * -AdminAddress swxap357.corp.ads.migros.ch | where-object {($_.CatalogName -match "MC11*") -and ($_.DesktopGroupName -eq "DG11A")}).DNSName Foreach ($machine in $Machines) {Write-Host $machine -ForegroundColor Yellow invoke-command -ComputerName $machine -ScriptBlock {get-service -name cpsvc | Start-Service} } |
0