Azure Automation Part1 - Working with PowerShell Runbooks to Automate Virtual Machine Creation

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

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

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

    Superb & straightforward presentation. I never subscribed to any channel, but yours. Gr8 work Neeraj.

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

    Really good.. looking for this for a long time... thanks

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

    thanks for the tutorial, one question, why you are creating a Custom Event Grid Topic @21:29, it does not seem to be used anywhere in following procedures. Instead, you used System Event Grid Topic @23:45 is used by the storage account.

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

      Thanks for reaching out. Event Grids work on a publisher subscriber model. So the first step is to create an event grid. After the event grid gets created, we need to have a subscriber subscribe to the topic. So @21:29, we are simply creating an event grid, but no subscription has bee done. The event subscription is being done from inside the automation account. @23:45. Unless and until you have an event grid, you cannot have a subscription. Also, this event subscription could have been done from inside the event grid. Hope it is now clear to you. Please let me know in case you still have doubts.

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

    Hi Neeraj,
    Such a nice Content

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

    Hello and thank you for great material. I lost you there @17:11 where did that CreateVM excel sheet come from ?

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

      Hello Mohmed, I created that file manually for the demo purposes, but you can create a service or an app that creates that excel sheet for you, may be with more relevant details.
      Hope this helps.

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

    Thanks I love the tagline
    KEEP AZURING....

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

    If run as account is disabled for me then how should I proceed further

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

      Hello Amol,
      What exactly do you mean when you say that the run as account is disabled for you? Can you not create a service principal using the PS script provided? Did you try to create the run as account during the creation of the automation service?

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

    can you create contect on azure function or Logic Apps ?

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

      Sure thing. I am currently completing the content for Azure Administration/Architect. Post that, I will start with Azure Developer course , which will cover these.

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

      @@AzureTrainingSeries thanks a lot

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

    Question Can I connect Kafka ( in azure ) using Azure API management ?

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

      Hi, I have not worked on Apache Kafka. It would help if you could elaborate more, but as far as I know, there isn't a direct method to consume the Kafka API's, but Apache Kafka can definitely be used with Azure HDInsight, and then you can use Azure APIM to work with HDInsight. Here is a link to the document.
      docs.microsoft.com/en-us/azure/hdinsight/kafka/apache-kafka-producer-consumer-api
      Hope this helps.

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

    Nice., I'm unable to create Service Principal, how do I authenticate if I'm not access to Azure AD in my organization

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

      Hello Fazil, Thanks for reaching out. The screens for automation account creation has been recently modified. Also, PowerShell modules for creating the service principal has been changed, so you will run into errors. It is suggested that you perform the below steps -
      1. create a user assigned managed identity,
      2. add it under identities
      3. give this identity contributor access under subscription
      4. in the initiate watcher runbook, for the command Connect-AzAccount, use -Identity and remove everything else - Connect-AzAccount -Identity
      Hope this helps. Please let me know how it goes.

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

      @@AzureTrainingSeries ​Thanks for your reply! I've followed your steps mentioned in the comment but The following error received when I run the below command "Connect-AzAccount -Identity -AccountId ********* " "ManagedIdentityCredential authentication unavailable. Multiple attempts failed to obtain a token from the managed identity endpoint" Can you pls guide me further

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

      I see that you have added '-AccountId' property with 'Connect-AzAccount' command. Remove that property and just keep it to "Connect-AzAccount -Identity".

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

      @@AzureTrainingSeries Cannot validate argument on parameter 'VMName'. The argument is null or empty. Provide an argument that is not null or empty, at this line "$VirtualMachine = New-AzVMConfig -VMName $vmName -VMSize $vmSize"

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

      Can you please check the excel sheet as to what header you have given and if it matches with the parameters in both PowerShell scripts.

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

    Hello Sir, Thanks for this tutorial , I have created this LAB in my test azure account , when I was try to create services principal use this CreateServicePrincipal SPAutomotion P@ssw0rd command getting error for me "Cannot find type [Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential]: verify that the assembly containing this type is loaded. "

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

      Hi Nitin, Thanks for reaching out. To get around this error, you need to import the module as below
      Import-Module Az.Resources. Hope this helps

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

      @@AzureTrainingSeries Same error but importing also did not help

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

      Thanks for reaching out, Anand. Things have changed since the time this video was made. You can now make use of managed identities. instead of using the Service Principal. Even the interface to create the automation account does not have this option. Below is the link to the update script without service principal credentials that can be used. Rest everything remains the same.
      github.com/LinkedInLearning/azure-automation-2898153/blob/main/InitiateWatcherProcess.ps1

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

    Why are using credentials in the automation account, you are doing things in a great manner but must tell what's the use of it also. Without it t's uselss.

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

      Great question! PowerShell Runbooks and Desired State Configuration (DSC) use credentials stored in the automation account for authentication purposes. They have commands that needs credentials for authentication before they could run. Its the same way as you are trying to run PowerShell commands from on-premises, but before you connect to your subscription, you need to authenticate yourself. Hope it explains

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

    Hello sir ,Here is the best content on azure..I have one question..Is their is any automation script for change sku of app service pllan & virtual machine from runbook

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

      Hello Sagar, I have not done that personally, but you can use the Set-AzureRmAppServicePlan command to do that. Now you can use the Az module instead of AzureRm module. You will have to do some research on that part. Hope this helps.