none
install BGinfo on Azure VM RRS feed

  • Question

  • How can I install the BGinfo extension? I looked it up on azure portal, but it's not listed there.

    Thursday, June 28, 2018 12:23 PM

Answers

  • I use this script you can try if fits on your needs.

    $subscriptionName = "YourSubscriptionName"
    $extensionName = "BGINFO"
    $extensionPublisher = "Microsoft.Compute"
    $extensionVersion = "2.1"
    $extensionType = "BGInfo"
    $location = "Location"
    $resourceGroupName = "YourResourceGroupName"
    $vmName = "YourVMName"
    
    
    #List available extensions for Azure VM
    Get-AzureVMAvailableExtension | Select ExtensionName, Publisher, CompanyName, Description, Type
    
    #connect to azure account
    Login-AzureRmAccount
    
    #set current subscription
    Set-AzureRmContext -SubscriptionName $subscriptionName
    
    #install extension
    Set-AzureRmVMExtension -ExtensionName $extensionName -Publisher $extensionPublisher -Version $extensionVersion -ExtensionType $extensionType -Location $location -ResourceGroupName $resourceGroupName -VMName $vmName
    
    
    
    

    • Marked as answer by James_White74 Thursday, June 28, 2018 12:29 PM
    Thursday, June 28, 2018 12:25 PM

All replies

  • I use this script you can try if fits on your needs.

    $subscriptionName = "YourSubscriptionName"
    $extensionName = "BGINFO"
    $extensionPublisher = "Microsoft.Compute"
    $extensionVersion = "2.1"
    $extensionType = "BGInfo"
    $location = "Location"
    $resourceGroupName = "YourResourceGroupName"
    $vmName = "YourVMName"
    
    
    #List available extensions for Azure VM
    Get-AzureVMAvailableExtension | Select ExtensionName, Publisher, CompanyName, Description, Type
    
    #connect to azure account
    Login-AzureRmAccount
    
    #set current subscription
    Set-AzureRmContext -SubscriptionName $subscriptionName
    
    #install extension
    Set-AzureRmVMExtension -ExtensionName $extensionName -Publisher $extensionPublisher -Version $extensionVersion -ExtensionType $extensionType -Location $location -ResourceGroupName $resourceGroupName -VMName $vmName
    
    
    
    

    • Marked as answer by James_White74 Thursday, June 28, 2018 12:29 PM
    Thursday, June 28, 2018 12:25 PM
  • Works perfectly, thanks!
    Thursday, June 28, 2018 12:29 PM