Add Existing NIC to Azure VM

Welcome Forums General PowerShell Q&A Add Existing NIC to Azure VM

This topic contains 0 replies, has 1 voice, and was last updated by  Barry 1 year, 3 months ago.

  • Author
  • #84062

    Points: 0
    Rank: Member

    While learning how to create VM's my session timed out and I lost my variable for the NIC, so I am trying to figure out how to add the NIC. As you can see it does not accept the NIC ID. Any thoughts?

    PS Azure:\> $nicId = (Get-AzureRmNetworkInterface -ResourceGroupName "myRG" -Name "NIC1").Id

    PS Azure:\> $nicID

    PS Azure:\> $vm = Add-AzureRmVMNetworkInterface -VM $vm -Id $nicID

    PS Azure:\> New-AzureRmVM -ResourceGroupname myRG -Location westUS -VM $vm
    New-AzureRmVM : Property id '5........' at path
    'properties.networkProfile.networkInterfaces[0].id' is invalid. Expect fully qualified
    resource Id that start with '/subscriptions/{subscriptionId}' or

The topic ‘Add Existing NIC to Azure VM’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort