Get-AzureRmAutomationHybridWorkerGroup needs to be updated to reflect new properties
Description
Get-AzureRmAutomationHybridWorkerGroup needs to be updated to reflect new properties that have been added such as last seen timestamp, credential and group type. These properties are all available from the REST API today but are not included in the PowerShell cmdlet results.
Script/Steps for Reproduction
Get-AzureRmAutomationHybridWorkerGroup -ResourceGroupName RGNAME -AutomationAccountName AANAME
Module Version
4.3.2 AzureRM.Automation
Environment Data
Name Value
---- -----
PSVersion 5.1.16299.251
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.251
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Debug Output
Relevant part of the debug output showing that these properties are returned by the REST call but some are not being then presented as properties by the cmdlet results (lastSeenDateTime, credential, groupType).
"id": "/subscriptions/scrubbed/resourceGroups/Testing1/providers/Microsoft.Automation/automationAccounts/scrubbed/hybridRunbookWorkerGroups/TESTHW1",
"name": "TESTHW1",
"hybridRunbookWorkers": [
{
"name": "TESTHW1",
"ip": "scrubbed",
"registrationTime": "2017-10-05T23:32:52.0529779-03:00",
"lastSeenDateTime": "2018-04-16T00:41:20.8-03:00"
}
],
"credential": null,
"groupType": "User"
},
@vrdmr Can you take a look at this issue?
it is still nearly impossible to retrieve the lastSeenDateTime property with powershell. even the generic Get-AzureRmResource with the correct type, namespace etc. is ignoring the array of workers.
finally I got it working by importing the latest Version 0.6.1 from the Az.Automation module. the same is true for the "old" commandlet with prefix AzureRM and Version 6.13.1: https://www.powershellgallery.com/packages/AzureRM/6.13.1
The missing property thing was already fixed in September https://github.com/Azure/azure-powershell/commit/e098199011c3ad09ef94a0b70f6de76f61bddd12#diff-f3a5751aabbc428aaa014a0c847c2e61
Closing as fixed.