Loading...

General Availability of Azure Automation extension for Visual Studio Code

General Availability of Azure Automation extension for Visual Studio Code

Visual Studio Code is a lightweight source code editor which runs on your desktop and is available for Linux, macOS, and Windows. It provides an industry leading creation & editing experience for languages and runtimes like PowerShell, Python etc. The extension offers you features for runbook management operations like editing runbook, triggering a job, tracking recent jobs, linking a schedule, asset management, local debugging etc. ensuring the developers and IT admins can author, debug, edit and manage automation runbooks without leaving the IDE (Visual Studio Code).

 

This extension leverages the Azure Account extension that provides a single Azure sign in and subscription filtering experience for all other Azure extensions. The extension also leverages the PowerShell extension that provides features like Syntax highlighting, IntelliSense for cmdlets, Local script debugging and many more features. You can also use Python extension like Python to use features such as IntelliSense, linting, debugging, code navigation, code formatting and more for Python scripts.

 

This extension has been available for a while and has registered over ~30K installs. It’s now ready for more exposure and usage with some improvements based on feedback as shared by the customers. We’ve built this experience for customers who heavily use the PowerShell ISE for writing runbooks instead of using the built-in browser-based interface for runbook authoring, while working with PowerShell cmdlets and Automation Assets. With a leg up to the current browser-based interface, the extension makes runbook developers more productive and reduces the E2E time for runbook management.

 

Key Features of the extension

  • Supports all the Automation – PowerShell 5, PowerShell 7, Python 2 and Python3 Runbooks
  • Supports test execution of job, publishing automation Job and triggering job in Azure as well as Hybrid runbook workers. You can execute runbooks locally also.
  • Supports Python positional parameters and PowerShell parameters for job tiggering.
  • Supports linking a Schedule to Runbook and creating webhook. Starting a job through Webhook is simplified.
  • You can manage the Automation Assets – certificates, variables, credentials, and connections.
  • You can see the recent last 10 jobs by right clicking on the job and select ‘Job Output’ from the menu.
  • You can debug PowerShell scripts locally.
  • You can compare local Runbook to the published or the draft runbook.
  • With this extension, here is the list of supported Runbook management operations.
    • Create Runbook
    • Fetch Draft Runbook
    • Fetch Published Runbook
    • Open Local
    • Compare Local Runbook
    • Upload As Draft
    • Publish Runbook
    • Delete Runbook.

Test Runbook and Jobs

  1. Run Local – Run local version of the automation job by right clicking the Runbook -> Run Local.
  2. Run Local in Debug Mode - Run local version of the PowerShell Runbooks in debug mode by allowing you to add breakpoints in the script. This provides support for using internal cmdlets like Get-AutomationVariable also (non-encrypted assets only supported currently).
  3. Start Automation Job – Start the automation job by right clicking in the Runbook properties -> Start Automation Job.
  4. Start Automation Test Job – Start the automation test job by right clicking in the Runbook properties -> Start Automation Test Job.
  5. Job Output – When a job is created, you can track the job output by clicking on Job Output option or you can go to Recent Jobs and right click to select Job Output. It polls the service every 5 seconds to show the job Output.

Work with Schedules, Assets and webhook

  1. You can View the properties of a schedule and Delete Schedule.
  • Link Schedule – You can link a schedule to the runbook by right clicking on the Runbook properties menu and selecting Link Schedule. It supports params and runOn option.
  • Add New Webhook – You can add a webhook to the runbook by right clicking on the Runbook properties menu and selecting Add New Webhook. It supports params and runOn option.
  1. You can create, update, or view the properties of Assets - Certificates, Connections, Credentials, Variables and Delete assets from the extension.

Swatidevgan_0-1697177491960.png

 

Walkthrough of various extension operations can be found on the Extension Overview in the Visual Studio marketplace.  Complete documentation can be found here.

 

Limitation

  • Creation of new Schedules is not supported.
  • Adding new Certificate in Assets is not supported.
  • Uploading Modules (PowerShell & Python Packages) from the extension is not supported.
  • Currently there is no auto-sync of local runbooks to Azure Automation Account Runbooks. You will have to perform the operation to Fetch or Publish runbook.
  • For python currently we do not provide any debug options. It should be performed by the user as they do in any python script by installing any debugger extension.
  • Creation of PowerShell 7.2 and python 3.10 not supported at present.

We are evaluating and will address these limitations in the future releases.

 

Feedback

Do share your review for us to improve the extension! We’ve already heard some great feedback about the extension helping users in the runbook authoring process. We hope you’ll try it out and let us know about your experience so we can continue to refine it.

Support for this extension is provided on our GitHub Issue Tracker. You can submit a bug report, a feature suggestion or participate in discussions.

Happy automating!

 Just getting started with Azure Automation? Learn about the service here and follow Azure Automation on Twitter for the latest updates.

 

 

 

 

 

 

 

 

Published on:

Learn more
Azure Governance and Management Blog articles
Azure Governance and Management Blog articles

Azure Governance and Management Blog articles

Share post:

Related posts

Azure Landing Zones - Policy Refresh Q1 FY25

ALZ - Policy Refresh Q1 FY25 is here! As you may be aware, the ALZ team release cadence is now on quarterly basis to help customers and partne...

1 year ago

Custom Policy- Reusable Logs Templates

Reusable Templates for Sending Logs to Log Analytics Workspace   Challenge:   When it comes to developing custom policies for sendin...

1 year ago

Enhancements to Azure Monitor Baseline Alerts for Azure Landing Zones

Introduction   Welcome to our latest blog post where we dive into a number of exciting new key updates, highlight the new portal accelera...

1 year ago

Introducing the Azure Policy Community Repo

Introducing the Azure Policy Community Repo   What is the Azure Policy Community Repo? The Azure Policy Community Repo is a collaborativ...

2 years ago

General Availability: Vaulted backups for Azure Blob Storage

We are excited to announce the general availability of vaulted backups for Azure Blob Storage. Vaulted backups can help you achieve complete p...

2 years ago

Azure Update Manager to support CIS hardened images among other images

What’s coming in by end of July 2024: Azure Update Manager will add support for 35 CIS hardened images. This is the first time that Update Man...

2 years ago

Mastering your cloud journey: Essentials to Innovating, Migrating and Modernizing, on Azure

We are living during a time of rapid growth in AI technologies and seeing cloud complexity increase as a result of those advanced workloads, w...

2 years ago

Public Preview Announcement: Azure Policy Built-in Versioning

Welcome to a new era of policy management, where policy definitions are more agile, adaptable, and accessible than ever before! We are thrille...

2 years ago

Announcing Azure Monitoring Agent support in Azure Landing Zones

Introduction   Hello and welcome to another blog post about Azure Landing Zones, the best practice framework for accelerating your cloud...

2 years ago

Announcing the General Availability of Change Actor

Change Analysis  Identifying who made a change to your Azure resources and how the change was made just became easier! With Change Analys...

2 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.