MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.2k stars 21.35k forks source link

The following document cmdlets needs to updated #114178

Closed bhawna121 closed 7 months ago

bhawna121 commented 1 year ago

In the following document subsection, "Manage Hybrid Worker extension using PowerShell" Step 2 cmdlet fails with an error, " not in proper GUID format.". Although the document asks to pass the value in hybridRunbookWorkerGroupName parameter, this is not correct, it needs to be passed in the -Name parameter of the command

MS Document URI : https://learn.microsoft.com/en-us/azure/automation/extension-based-hybrid-runbook-worker-install?tabs=windows%2Cps#manage-hybrid-worker-extension-using-bicep--arm-templates-rest-api-azure-cli-and-powershell

Step 2 description image

Lab for the error using the cmdlet mentioned in Step 2

$guid = [System.Guid]::NewGuid()
$guidString = $guid.ToString() $vmResourceId= "/subscriptions/xxxxxxxxxxxxx/resourceGroups/MyRG/providers/Microsoft.Compute/virtualMachines/RHEL7.9"

New-AzAutomationHybridRunbookWorker -AutomationAccountName "Az-AA-CenInd" -Name "RHEL7.9" -HybridRunbookWorkerGroupName "TestonCLI1" -VmResourceId $vmResourceId -ResourceGroupName "Az-Lab2-RG"

Another example: New-AzAutomationHybridRunbookWorker -AutomationAccountName "Az-AA-CenInd" -Name "RHEL7.9" -HybridRunbookWorkerGroupName $guidString -VmResourceId $vmResourceId -ResourceGroupName "Az-Lab2-RG"

Error: New-AzAutomationHybridRunbookWorker: The hybrid runbook worker id 'RHEL7.9' is not in proper GUID format.

image

Resolution: Successful Output using Above command but by passing the Guid Name parameter :

New-AzAutomationHybridRunbookWorker -AutomationAccountName "Az-AA-CenInd" -Name $guidString -HybridRunbookWorkerGroupName "TestonCLI1" -VmResourceId $vmResourceId -ResourceGroupName "Az-Lab2-RG"

image

Suggestion:

  1. Include how to generate GUID using the below command
  2. Update the text with the correct parameter name.

Document Details

MS Document URI : https://learn.microsoft.com/en-us/azure/automation/extension-based-hybrid-runbook-worker-install?tabs=windows%2Cps#manage-hybrid-worker-extension-using-bicep--arm-templates-rest-api-azure-cli-and-powershell

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

SaibabaBalapur-MSFT commented 1 year ago

@bhawna121 Thanks for your feedback! We will investigate and update as appropriate.

MonikaReddy-MSFT commented 1 year ago

@bhawna121 - Thanks for bringing this to our attention. I'm going to assign this to the document author so they can review and update accordingly.

SnehaSudhirG commented 7 months ago

Thanks for your dedication to our documentation. Unfortunately, at this time we have been unable to review your issue in a timely manner and we sincerely apologize for the delayed response. The requested updates have not been made since the creation of this issue, and the timeline for resolution may vary based on resourcing, so we've created an internal work item to incorporate your suggestions. We are closing this issue for now, but feel free to comment here as necessary. #please-close