How can we improve Azure Automation service?

Allow arbitrary naming of DSC nodes

If I have multiple VM's in multiple regions and the VM name is duplicated, there's no easy way to know which is which. Can we have some control of the name used when registering the VM? Or can we have some mechanism to apply and view tags?

6 votes
Vote
Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)
You have left! (?) (thinking…)
Charlie Holland shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

2 comments

Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)
Submitting...
  • kubilay commented  ·   ·  Flag as inappropriate

    Adding VM's Resource Group Name column into the DSC Nodes blade in the Portal may help.
    Below is PS script which adds VM Resource Group Name as the first column.
    Hope this helps until the Portal is updated.

    1. Please save the below script as file name Get-AzureRmAutomationDscNode-WithVMsRGName.ps1.
    2. Then run it in a local PowerShell windows as:
    .\Get-AzureRmAutomationDscNode-WithVMsRGName.ps1 -AutomationResourceGroupName YourAutomationRGName -AutomationAccountName YourAutomationAccountName

    param(
    [Parameter(Mandatory = $true)]
    [String] $AutomationResourceGroupName,

    [Parameter(Mandatory = $true)]
    [String] $AutomationAccountName
    )
    import-module AzureRM.profile -MinimumVersion 4.0.0
    Add-AzureRmAccount

    Import-Module AzureRM.Automation
    Import-Module AzureRM.Network

    $dscNodes = Get-AzureRmAutomationDscNode -ResourceGroupName $AutomationResourceGroupName -AutomationAccountName $AutomationAccountName
    $dscNodesWithRgName = @()
    foreach($dscNode in $dscNodes)
    {
    $ipOfDsc = $dscNode.IpAddress.Split(";")[0]
    $vmRgName = (Get-AzureRmNetworkInterface | where { $_.IpConfigurations.PrivateIpAddress -eq "$ipOfDsc" }).ResourceGroupName

    $dscNode | Add-Member -NotePropertyName VmRgName -NotePropertyValue $vmRgName
    $dscNodesWithRgName += $dscNode
    }
    $dscNodesWithRgName | select -Property VmRgName,Name,Status, NodeConfigurationName,LastSeen | ft

Feedback and Knowledge Base