@@ -12,32 +12,29 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
12
12
[ OutputType ( typeof ( HybridRunbookWorkerGroup ) ) ]
13
13
public class GetAzureAutomationHybridWorkerGroup : AzureAutomationBaseCmdlet
14
14
{
15
- [ Parameter ( ParameterSetName = AutomationCmdletParameterSets . ByName , Position = 2 , Mandatory = false , ValueFromPipeline = true , HelpMessage = "The Hybrid Runbook Worker Group Name " ) ]
15
+ [ Parameter ( ParameterSetName = AutomationCmdletParameterSets . ByName , Position = 2 , Mandatory = false , ValueFromPipeline = true , HelpMessage = "The Hybrid Runbook Worker Group name " ) ]
16
16
[ Alias ( "Group" ) ]
17
17
public string Name { get ; set ; }
18
18
19
19
protected override void AutomationProcessRecord ( )
20
20
{
21
- IEnumerable < HybridRunbookWorkerGroup > ret = null ;
22
21
if ( this . ParameterSetName == AutomationCmdletParameterSets . ByName )
23
22
{
23
+ IEnumerable < HybridRunbookWorkerGroup > ret = null ;
24
24
ret = new List < HybridRunbookWorkerGroup > {
25
25
26
26
this . AutomationClient . GetHybridRunbookWorkerGroup ( this . ResourceGroupName , this . AutomationAccountName , this . Name )
27
- } ;
27
+ } ;
28
28
this . GenerateCmdletOutput ( ret ) ;
29
29
}
30
30
else if ( this . ParameterSetName == AutomationCmdletParameterSets . ByAll )
31
31
{
32
32
var nextLink = string . Empty ;
33
33
do
34
34
{
35
- var results1 = this . AutomationClient . ListHybridRunbookWorkerGroups ( this . ResourceGroupName , this . AutomationAccountName , ref nextLink ) ;
36
- // ret = this.AutomationClient.ListHybridRunbookWorkerGroups(this.ResourceGroupName, this.AutomationAccountName, ref nextLink);
37
-
38
- this . GenerateCmdletOutput ( results1 ) ;
35
+ var results = this . AutomationClient . ListHybridRunbookWorkerGroups ( this . ResourceGroupName , this . AutomationAccountName , ref nextLink ) ;
36
+ this . GenerateCmdletOutput ( results ) ;
39
37
} while ( ! string . IsNullOrEmpty ( nextLink ) ) ;
40
-
41
38
}
42
39
}
43
40
}
0 commit comments