Skip to content

Instantly share code, notes, and snippets.

@f-bader
Created January 29, 2018 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save f-bader/1f5aedbdcbc60d2f47fc2661bb6d037c to your computer and use it in GitHub Desktop.
Save f-bader/1f5aedbdcbc60d2f47fc2661bb6d037c to your computer and use it in GitHub Desktop.
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 }
$HybridWorkerGroup.RunbookWorker.Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment