Automation

Azure Automation allows you to automate the creation, monitoring, deployment, and maintenance of resources in your Azure environment using a highly-available workflow execution engine. Orchestrate time-consuming, error-prone, and frequently repeated tasks against Azure and third party systems to decrease time to value for your cloud operations.

Visit the Automation page to learn more about Automation and how to get started.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Redeploying jobSchedule resource from ARM template

    Currently Microsoft.Automation/automationAccounts/jobSchedules resources cannot be redeployed from ARM template if there are existing jobSchedules pointing to the same runbook and schedule. The deployment would return:

    "A job schedule for the specified runbook and schedule already exists"

    Same issue even deploying with a different name (GUID) for the jobSchedule.

    Currently the workaround is deleting the existing resource and redeploy, which is a very cumbersome approach for automation.

    139 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    triaged  ·  5 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  2. Add possibility to end a test job when it hangs.

    Sometimes when running code in a PS runbook something seems to hang. I'm getting the following error although the job probably finished long time ago:
    "BadRequest: Test job is already running."
    I would like to have the opportunity to clear any running test jobs to bypass this bug.

    76 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  3. Start/Stop VMs during off-hours for CSP Azure Subscription

    The latest scripts are working fine for CSP Azure Subscriptions (as of 2018-06-10)

    But each job run throws lot of job errors with message content like:

    Get-AzureVM : ForbiddenError: The server failed to authenticate the request. Verify that the certificate is valid and
    is associated with this subscription.
    At line:168 char:16
    + $currentVM = Get-AzureVM | where Name -Like $filtervm.Trim() ...
    + ~~~~~~~~~~~
    + CategoryInfo : CloseError: (:) [Get-AzureVM], ComputeCloudException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzureVMCommand

    Job: ScheduledStartStop_Parent

    CSP based Azure subscriptions have no ASM functionality

    36 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  4. Change behavior when sandbox runs out of memory (1MB max to one stream limit)

    There is currently a maximum limit of 1MB when outputting values to the any stream (Serialized size per object in pipeline).
    I understand why this limit is there, but I don't think the current behavior is the right way to go.

    Current behavior is that the runbook restarts, and runs 3 times until it is stopped with the following error:

    Suspended
    The job action 'Activate' cannot be run, because the process stopped unexpectedly. The job action was attempted 3 times.

    If we run it on look at the eventlog on a hybrid worker (this error also happens in Azure workers),…

    34 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
    under review  ·  Beth Cooper responded

    Thanks for posting this feedback! I’m checking with our team to see if there is anything that we can do about this in the short term. We’ll definitely take this into consideration in our longer term plans.

  5. Compilation of DSC Configuration Data Hashtable Variables converts them to PSCUstomObjects

    When creating a DSC configuration and assigning a hashtable to a variable in the configuration data the type is lost during compilation. Doing the compilation locally the hashtable is maintained and can be accessed to branch the configuration. Unfortunately when compiling using Azure Automation the hashtable is converted to a PSCustomObject which does not behave in the same way.

    16 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  6. Display Powershell 5 information stream in runbook output

    Anything written to the new Powershell 5 information stream (stream 6) doesn't appear in the job output if $InformationPreference is set to 'Continue'.

    14 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  7. Outgoing connection only use TLS 1.0 for connectivity (TLS 1.1 or TLS 1.2 are not used)

    If you disable TLS 1.0 on server side then Azure Automation stack will fail to establish WinRM session with such computer. Desktop version of PowerShell does not have this issue. Easy to reproduce behavior. This affects not only Azure automation but also Application Insights Webtests as well.
    Test-WSMan will show in such cases error "The SSL connection cannot be established."

    14 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
    under review  ·  Beth Cooper responded

    Thanks for this feedback. Have you tried using a hybrid runbook worker for this? We would like to fix this in the future for our Azure runbook workers, but I think that hybrid should get you there right now.

  8. ParentJobId not showing in Hybrid Worker scenario

    Recently the Azure Automation team released the functionality to be able to get the job Id of the current running Automation job. (https://feedback.azure.com/forums/246290-azure-automation/suggestions/10300698-power-shell-runbook-add-support-to-get-own-job-i)
    This works fine by using the command: $PsPrivateMetaData.JobId.Guid in a normal PowerShell runbook although if you use a hybrid worker scenario the earlier mentioned command gives no output.

    13 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
    started  ·  Beth Cooper responded

    Update: our team is currently working on getting this fixed.

  9. "Copy" as in Copy/Past works intermittently from Edit screen

    When trying to copy paste data, the copy works intermittently at best. I have not been able to reliably replicate a scenario where this works. I can literally select some text, copy it, paste it to notepad (or something else), then go back to copy something else and it fails to copy still retaining what I last had in the clipboard.

    12 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
    under review  ·  Beth Cooper responded

    Thanks for reporting this! What browser are you using? Does refreshing the portal help with the issue?

  10. Missing Automation Account Tags

    When searching for an Automation Tag, despite having created a new one, through using the Powershell Command (or through the Portal) the Automation Account Object does not return the Tag. i.e. Get-AzureRMAutomationAccount -ResourceGroupName SomeResourceGroup returns the account but Tags : {} and (Get-AzureRMAutomationAccount -ResourceGroupName SomeResourceGroup).Tags.Count returns a count of 0.

    9 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  11. previously working SSH scripts now says "cmdlet not found"

    This may be temporary since I've noticed some changes in the preview portal, but my previously (about 12 hours ago) working SSH scripts are now not recognizing Invoke-AutomationSshCommand:

    Failed
    The term 'Invoke-AutomationSshCommand' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    9 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
    under review  ·  Beth Cooper responded

    Hi Linus,

    I think this was answered on a few other channels, but wanted to post an update here just in case. We have removed this default module from the service, and do not have a planned ETA on when we will add this back.

    I’ll treat this as a vote to add a Microsoft Linux supported module, to help us prioritize when we can get the module back into the service.

    Thanks,
    Beth

  12. Method invocation failed because [Orchestrator.Shared.Shared.TraceEventSource] does not contain a method named 'ProcessSourceControlWebhook

    Using the Source Control preview feature in Azure Automation fails when AutoSync in enabled and runs an incremental update connected to an Azure DevOps Git repo with the above error displayed in the Azure Job Logs.

    It works if you manually run a Full sync, incrementals don't work it seems.

    Method invocation failed because [Orchestrator.Shared.Shared.TraceEventSource] does not contain a method named
    'ProcessSourceControlWebhookRunbookInformational'.

    This seems to be a bug with the above missing method.

    9 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  13. Make tutorials that work

    Have you tutorials and documentation accurately describe how your system works.

    eg. how the **** do i pass in an object to the input params on test? your webhook tutorial implies you can do it just with JSON encoding.... NOPE

    https://docs.microsoft.com/en-us/azure/automation/automation-webhooks

    And then your docs on automation runbook input paramaters says you should encode it in the hashmap format. Nope again!

    https://docs.microsoft.com/en-us/azure/automation/automation-runbook-input-parameters

    8 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →

    Thanks for bringing up this issue. The webhook automatically converts the input from json when called whereas when manually run, it is required to do this yourself. You can follow the below approach in your runbook where you take in an optional parameter that indicates if it is a manual input or if it is coming through the webhook. If set to true, it will convert the input from Json, otherwise by default it will just take the passed in object from the webhook.

    You should be able to pass in {"WebhookName":“MyWebhook”, “RequestHeader”:{"From":“Test User”}, “RequestBody”:“[\”VM1\“,\”VM2\“]”} and set the ManualTesting to true.

    Param
    (
    [Parameter(Mandatory=$false)]
    [Object]
    $WebhookData,

    [Parameter(Mandatory=$false)] [Boolean] $ManualTesting = $false

    )

    if ($ManualTesting)
    {
    $WebhookData = ConvertFrom-Json $WebhookData
    }

    Write-Output ($WebhookData.WebhookName)
    Write-Output ($WebhookData.RequestBody)
    Write-Output ($WebhookData.RequestHeader)

    We will work to update the documentation to clarify this and give the example. Sorry it caused this issue for you and thanks again…

  14. Automation variable being changed from [Array] to [JArray]

    Not sure if I'm doing something wrong as it appears a fairly fundamental problem but I can't see any reports of this anywhere.

    I have created an automation variable via:

    New-AzureRmAutomationVariable -Name MyArrayVariable `
    -Value ([array]@('FirstOne', 'SecondOne', 'ThirdOne')) `
    -ResourceGroupName myresourcegroup `
    -AutomationAccountName myautomationaccount `
    -Encrypted $false

    However when I then access this variable from a PowerShell runbook, the data type is a Newtonsoft.Json.Linq.JArray rather than a standard System.Array

    I also can't access it through the pipeline as I normally would:

    $MyArrayVariable = Get-AutomationVariable -Name 'MyArrayVariable'
    $MyArrayVariable | ForEach-Object {Write-Output ('This one is: ' + $_)}
    Write-Output ('Resource group list…

    7 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  15. Forward job status and job streams from Automation to Log Analytics (OMS) - failed runbooks not forwarded?

    I`ve followed these instructions to enable log analytics in OMS: https://docs.microsoft.com/nb-no/azure/automation/automation-manage-send-joblogs-log-analytics

    However, status for failed runbooks does not seem to be logged. If I search for all job logs for the past month (Category=JobLogs), all that is returned is runbook jobs with the result type "Started" and "Succeeded" (see attachment). If I check the job logs manually in Azure Automation I can see several failed runbooks which I expected to be visible in OMS. Is this a bug?

    7 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  16. Improve handling of unassigned return objects

    When the SharePointPnPPowershellOnline module is used in Azure Automation in a normal Powershell Script runbook, the runbooks fail silently after 3 attempts if return objects from for example Add-PnPListItem or Set-PnPListItem are not assigned to variables.
    Reference this Issue: https://github.com/SharePoint/PnP-PowerShell/issues/1541#issuecomment-402043124
    The handling of return objects should default to the standardoutput as Powershell normally would. Or at least improve the error message as the link currently Points to the common "DLL Load failed or OutOfMemoryException" documentation web page.

    6 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  17. Start-AzureRmAutomationDscCompilationJob incorrect error message when configurationname is incorrect

    When calling Start-AzureRmAutomationDscCompilationJob if the configurationname parameter is not a published config, the error message reports that the AutomationAccount is not found.

    The correct error should state that the ConfigurationName is not found.

    6 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  18. Some regions as Canada East are returning inconsistent location names

    There is an inconsistency when returning location for this region and maybe others

    This API call

    https://management.azure.com/subscriptions/{subscription}/locations?api-version=2016-06-01
    returns

    {
    "id": "/subscriptions/189e3956-5b16-4ecc-b283-0736f9bbc422/locations/canadaeast",
    "name": "canadaeast",
    "displayName": "Canada East",
    "longitude": "-71.217",
    "latitude": "46.817"
    },
    but other API calls returning locations such as Virtual Machines, AvailabilitySets or others return this location in capital letters

    https://management.azure.com/subscriptions/189e3956-5b16-4ecc-b283-0736f9bbc422/providers/Microsoft.Compute/virtualmachines?api-version=2016-04-30-preview
    https://management.azure.com/subscriptions/189e3956-5b16-4ecc-b283-0736f9bbc422/providers/Microsoft.Compute/availabilitySets?api-version=2017-03-30

    {
    "properties": {
    "platformUpdateDomainCount": 5,
    "platformFaultDomainCount": 3
    },
    "type": "Microsoft.Compute/availabilitySets",
    "location": "CanadaEast",
    "tags": {
    "jclouds": "abiquo-canadaeast",
    "abiquo": "canadaeast"
    },
    "id": "/subscriptions/189e3956-5b16-4ecc-b283-0736f9bbc422/resourceGroups/ABIQUO-CANADAEAST/providers/Microsoft.Compute/availabilitySets/abiquo-canadaeast",
    "name": "abiquo-canadaeast",
    "sku": {
    "name": "Classic"
    }
    }

    This is inconsistent with other regions tested and is problematic for 3rd party tools

    Is there anywhere i could…

    5 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  19. Azure Automation DSC Custom Modules Fail when the ZIP file has a Version folder

    When a custom module is ZIP'ed up with the file structure:
    ModuleName.zip
    |___8.0.0.0
    |____DSCResources
    |_________ResourceName.psm1

    Loading it into Azure Automation works correctly and the version number is picked up. However when running a DSC Configuration against an on-premises virtual machine the following folder structure is created:

    ModuleName.zip
    |___8.0.0.0
    |_______8.0.0.0
    |____DSCResources
    |_________ResourceName.psm1

    This double version folder causes the virtual machine to not be able to find the resource and as such the configuration will fail.

    Rebuilding the ZIP to remove the version folder and re-importing works:
    ModuleName.zip
    |____DSCResources
    |_________ResourceName.psm1

    5 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
  20. Auto-created Template 'automation scripts' should fully adhere to Schema rules including case sensitivity

    Currently the 'Automation scripts' for artefacts include terms such as:

    {
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
    "virtualNetworks_dev_vnet_name": {
    "defaultValue": "dev-vnet",
    "type": "String"

    Note that the automation script has 'String' with a capital letter but the schema defines it as 'string'.

    This means products like Visual Studio Code identify the term with an wiggly underline to show it does not adhere to the schema. See attached image.

    This is frustrating and should be excpetionally simple to fix - just have the code that creates the automation script output within the Azure Portal create script template code that adheres…

    5 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Bug  ·  Flag idea as inappropriate…  ·  Admin →
← Previous 1 3
  • Don't see your idea?

Feedback and Knowledge Base