Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Select all Hybrid Workers within the same Hybrid Worker Group as the current computer
$ComputerSystem = (Get-CimInstance Win32_ComputerSystem)
$FqDn = "$($ComputerSystem.Name).$($ComputerSystem.Domain)"
$HybridWorkerGroup = Get-AzureRmAutomationAccount | Get-AzureRMAutomationHybridWorkerGroup | Where-Object { $FqDn -in $_.RunbookWorker.Name }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment