Showing results for Category: RunCommand from Azure VM Runtime Team

Feb 26, 2025
Post comments count0
Post likes count1

Using Powershell7 with Managed Runcommand

Joseph Calev
Joseph Calev

Today, all scripts run through Managed RunCommand will by default use Powershell 5. What if you have a script that requires Powershell7? This is supported via a new feature, but you will need to specify the different script shell. Here's what you need to do. Ensure your VM has Powershell7 Powershell7 is not installed by default. To ensure ...

Azure VM Runtime TeamRunCommand
Apr 29, 2024
Post comments count0
Post likes count0

Introducing Managed RunCommand Artifacts

Joseph Calev
Joseph Calev

As most of you may know from the current Managed RunCommand documentation there are multiple ways your script may be specified. However, what if your script uses various artifacts that also must be downloaded to the machine? Well, in the past it was necessary to call RunCommand are use some other technique to get those files on the...

RunCommand
Apr 3, 2024
Post comments count0
Post likes count1

Using Managed RunCommand in an ARM Template

Joseph Calev
Joseph Calev

Perhaps one of the largest differences between "Action RunCommand" (internally called RunCommand V1) and "Managed RunCommand" (internally called RunCommand V2) is that Managed RunCommands are ARM resources themselves. That means you can use them in ARM templates. Recently, I needed to issue a RunCommand in an ARM template, so I looked around for...

RunCommandARM Template
Jan 5, 2024
Post comments count0
Post likes count1

When will CustomScript extension re-execute my script?

Joseph Calev
Joseph Calev

One of the lesser known differences between RunCommand and CustomScriptExtension is the fact that we do promise to not re-run your script in RunCommand, but no such promise exists for CustomScript. This is mentioned in the documentation, which isn't often fully understood. However, more than once I've been asked: when does CSE actually re-...

CustomScriptExtensionRunCommand
Dec 11, 2023
Post comments count0
Post likes count0

The treatFailureAsDeploymentFailure flag

Joseph Calev
Joseph Calev

In both VmApplications and RunCommand, we support a property called "treatFailureAsDeploymentFailure". Note that for Managed RunCommand it may not be visible yet in Powershell or CLI, but it is available via ARM. Note that this flag is only available for managed RunCommand. It is not available for action RunCommand. For those unaware, managed RunCo...

VM ApplicationsRunCommand
Jun 16, 2023
Post comments count0
Post likes count1

How to determine if your Runcommand script failed

Joseph Calev
Joseph Calev

Today, we're going to cover what can be a maddening issue in just determining whether your script failed. Let's start with a very simple operation. Open a Powershell window and run the following: This shouldn't be rocket science here. It's very clear that "this is an error" is, in fact, an error. So, with this universal fact determined, let's...

RunCommand
Mar 10, 2023
Post comments count0
Post likes count2

Long running RunCommands

Joseph Calev
Joseph Calev

Recently, there's been a bit of confusion involving long running RunCommands. For reference, the default wait time for RunCommand has been 90 minutes - the same as all other extensions. But what if you have a script that takes longer? Well, we've added a timeoutInSeconds parameter just for that purpose! The only slight problem is this ...

RunCommandAzure VM Runtime Team
Feb 17, 2023
Post comments count0
Post likes count2

RunCommand vs Custom Script Extension vs VM Applications

Joseph Calev
Joseph Calev

I'm sure that many of you would swear that Microsoft loves to confuse you. Currently, there are not three but four ways to run code on your machine. Now, I know what you're saying. "I just want to run this thing on my machine! Which do I choose?" Well, here I hope to clear that up. First, all of the above work on both Window...

VM ApplicationsRunCommandAzure VM Runtime Team