How to run scripts in your Azure VM by using Run Command 🔧

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 พ.ย. 2024

ความคิดเห็น • 32

  • @Cmart6444
    @Cmart6444 2 ปีที่แล้ว +1

    Your video was HELFUL Thomas, INDEEED!!! thanks a lot Bro!!!! You´re a rockstar!!!!

  • @mohammedmclovin4450
    @mohammedmclovin4450 ปีที่แล้ว +4

    This video is gold! Thanks, Thomas!

  • @SmallvilleJW
    @SmallvilleJW 3 ปีที่แล้ว +2

    Hey Thomas, this was awesome! Thank you so much for carefully going through the example. This will be a very useful way for us to better manage our environment.

    • @Thomas_Maurer
      @Thomas_Maurer  3 ปีที่แล้ว +1

      Thank you for the feedback. Great to hear!

  • @harrydesanto8522
    @harrydesanto8522 3 ปีที่แล้ว +1

    Amazing video, Thomas! Thank you!
    I've been wondering if it's possible to use this method through runbooks, but I believe that there is not command "code". Would be great if we could create something like a string into own code to write the ps1 file.

  • @ARinasKitchen18
    @ARinasKitchen18 6 หลายเดือนก่อน

    Nice information ❤❤❤

  • @soccerschannel
    @soccerschannel 3 ปีที่แล้ว +1

    Brilliant video. Quick question, if you want to call the script from a runbook, where do you store the script. Can you upload the script to blob and call from there?

  • @sochaktatai
    @sochaktatai 3 ปีที่แล้ว

    This is brilliant!...I did try run command in automation run book but the only problem is that it is not displaying the output result after running the script ..Any idea how I can get that?

  • @dasiths
    @dasiths ปีที่แล้ว +1

    Is that fake bamboo tree behind you from Ikea? haha I have the same one.

  • @vipulm124
    @vipulm124 ปีที่แล้ว +1

    Great video. I have been trying to use the same method to execute an existing python script on VM. But it says that Python is not installed, although it is. Any clue?

    • @Thomas_Maurer
      @Thomas_Maurer  ปีที่แล้ว

      You need to install python on the hybrid worker nodes.

  • @MuhammadBerki
    @MuhammadBerki 3 ปีที่แล้ว +1

    Thanks 🙂

  • @xxxxxx6461
    @xxxxxx6461 3 ปีที่แล้ว

    Thank you for this video it is great! Is it possible for example to run 'az version' on the remote vm? when I try this with scripts like you did I fail because 'az' is not recognized, but on the VM itself with Remote Desktop Connection it works

  • @jannarkiewicz633
    @jannarkiewicz633 7 หลายเดือนก่อน

    I needed a script to run at start up so off to find another video.

  • @srajpoot1981
    @srajpoot1981 3 ปีที่แล้ว

    Hi, would it be possible to show an example of running a VM in interactive mode?
    This will help in setting up a testing pipeline which is going to pull latest automation scripts from azure git-repo into the vm, and then lanch the automation testing tool. Which will execute functional tests.
    I am struggling with invoking the vm/agent through the pipeline. Then I have to run automation tests on that agent/vm

    • @rinceantony6555
      @rinceantony6555 ปีที่แล้ว

      @srajpoot1981 , Were you able to achieve what you mentioned above? I have a similar requirement and would be eager to know how you did it.

  • @zzaidi_
    @zzaidi_ 2 ปีที่แล้ว +1

    hi Thomas Maurer
    is there any option if we can run this script for certain VMs we want instead of the entire resources group?

    • @Thomas_Maurer
      @Thomas_Maurer  2 ปีที่แล้ว

      Yes I have a blog about that here: www.thomasmaurer.ch/2021/03/how-to-run-scripts-against-multiple-azure-vms-by-using-run-command/

    • @zzaidi_
      @zzaidi_ 2 ปีที่แล้ว

      @@Thomas_Maurer i have an issue with Parallel Script
      ForEach-Object : Parameter set cannot be resolved using the specified named parameters.
      At line:4 char:15
      + $myAzureVMs | ForEach-Object -Parallel {
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : MetadataError: (:) [ForEach-Object], ParameterBindingException
      + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.PowerShell.Commands.ForEachObjectCommand
      do you familiar with this ?

    • @Thomas_Maurer
      @Thomas_Maurer  2 ปีที่แล้ว

      @@zzaidi_ what PowerShell version are you using?

  • @navyak7036
    @navyak7036 3 ปีที่แล้ว

    Do you take powershell scripting coding

  • @anuradhasharma4340
    @anuradhasharma4340 4 หลายเดือนก่อน

    I am getting error at line 2: $out = Invoke-AzVMRunCommand "Cannot Index into a null array". How to resolve that ?

  • @shashidec2
    @shashidec2 2 ปีที่แล้ว

    I think there is time out of 90 mins to run powershell script using this command on azure vm. Is there any alternative to this which can run for more than 90 mins. We need to run powershell scripts on vm which takes around 3 to 4 hrs.

  • @venkateshkosuru
    @venkateshkosuru 11 หลายเดือนก่อน

    Hi Thomas,
    Thanks for a informative video, can you please let me know how do i run the "Invoke-AzVMRunCommand" through a function app or logic app.

    • @Thomas_Maurer
      @Thomas_Maurer  7 หลายเดือนก่อน

      yes you can do that :)

  • @headinthecloudheartintheco6129
    @headinthecloudheartintheco6129 3 ปีที่แล้ว +1

    😁

  • @harshlodha1856
    @harshlodha1856 11 หลายเดือนก่อน +2

    You did not show the rest api way

    • @Thomas_Maurer
      @Thomas_Maurer  7 หลายเดือนก่อน

      Yes but we have some good docs on that on Microsoft Learn.