Created
January 29, 2018 08:45
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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