Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

script problem

$
0
0

Hello

I have created a vm, with following details..

dnsname: myname.cloudapp.net
name: myname

I have installed the azure cmdlet powershell tools and downloaded the publishing certificate and imported into azure powershell

I am now trying to setup multiple endpoints using the following script

**************************
$i={55000} do { Get-AzureVM -ServiceName "myname" -Name "myname" | Add-AzureEndpoint -LocalPort $i -PublicPort $i -Name MW3Port$i -Protocol UDP | Update-AzureVM; $i+=1 } until ($i -gt {65000})
***************************

But I keep getting the error:

*******************************
Get-AzureVM : Value cannot be null
Parameter name: subscriptionId
At line:2 char:3
+ { Get-AzureVM -ServiceName "myname" -Name "myname" | Add-AzureEndpoint -Loca ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzureVM], ArgumentNullException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzureVMCommand
*******************************

When I do the following command: Get-AzureSubscription....

*******************************
SubscriptionName           : myname
SubscriptionId             :
ServiceEndpoint            : https://management.core.windows.net/
ActiveDirectoryEndpoint    :
ActiveDirectoryTenantId    :
IsDefault                  : False
Certificate                :
CurrentStorageAccountName  :
CurrentCloudStorageAccount :
ActiveDirectoryUserId      :
*******************************

I have a blank in my subscitionID ...  ???  any ideas please?

thanks


Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>