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

Exception- Name cannot be null or empty.

$
0
0

Hi,

New to Azure, I'm trying to author and test a simple workflow script using Azure Portal runbook with the following code:

workflow Book1
{
    Param
    (   
        [parameter(Mandatory=$true)]
        [String]
        $VMName,         

        [parameter(Mandatory=$true)]
        [String]
        $ServiceName
    )

$subscriptionName = Get-AutomationVariable -Name "Some account"
$subscriptionID = Get-AutomationVariable -Name "some subscription"
$certificateName = Get-AutomationVariable -Name "test"
$certificate = Get-AutomationCertificate -Name $certificateName

    Set-AzureSubscription -SubscriptionName $subscriptionName -SubscriptionId $subscriptionID -Certificate $certificate
    Select-AzureSubscription $subscriptionName

    Start-AzureVM -Name $VMName -ServiceName $ServiceName
}

Finally I get the exception:Exception -Name cannot be null or empty.

Can someone please give some pointers as to where is the problem? Also, how can i debug on the Portal?

Thanks in advance.

Gabe




Viewing all articles
Browse latest Browse all 12545

Trending Articles



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