I can't set current subscription to default

Welcome Forums General PowerShell Q&A I can't set current subscription to default

This topic contains 2 replies, has 2 voices, and was last updated by

9 months, 3 weeks ago.

  • Author
  • #97263

    Points: 0
    Rank: Member

    I'm trying to run this script to update the guest agent for some of the VMs:

    $vm = Get-AzureVM –ServiceName –Name
    $vm.VM.ProvisionGuestAgent = $true
    Update-AzureVM –Name –VM $vm.VM –ServiceName

    I'm getting an error to set the default subscription (I have two subs)!! I already did set the default subscription using the Select-AzureVMSubscription.

    Any Ideas?


  • #97340

    Points: 1,785
    Helping HandTeam Member
    Rank: Community Hero

    Honestly, troubleshooting that is something I'd need access to your account to do :). It might be worth opening a support ticket with Azure since it's happening in their back-end.

  • #97470

    Points: 0
    Rank: Member

    Thanks Don!

    I did submit a support ticket with Microsoft and they already escalated the issue but they are still blaming Powershell that's why I posted the question in here.

    What I have been trying to accomplish is to replicate some of the VMs in azure to a different region and some of them are greyed out! So after troubleshooting we found out that the agent quest needs to be updated and you know it has to be done via Powershell

The topic ‘I can't set current subscription to default’ is closed to new replies.