locked
RegisterwithAzurestack.ps1 fails with: C:\Temp\RegisterWithAzure.ps1 : Parameter set cannot be resolved using the specified named parameters. RRS feed

  • Question

  • Hi

    Just trying to install Azurestack (latest Version) with the Step-by-Step from MS

    But now im getting an error...and I dont know why

    Ist the step "Register Azure Stack with Azure)

    Im trying to run the script:registerWithAzureStack which I have copy/saved to c:\temp

    I started the script as the azure Stack admin

    Then I´ll get this (from Register-AzureStack.20170801-021707 logfile)

    **********************
    Windows PowerShell transcript start
    Start time: 20170801021707
    Username: AZURESTACK\AzureStackAdmin
    RunAs User: AZURESTACK\AzureStackAdmin
    Machine: WIN-JA7CQ6Q4RCL (Microsoft Windows NT 10.0.14393.0)
    Host Application: C:\Windows\system32\WindowsPowerShell\v1.0\PowerShell_ISE.exe
    Process ID: 13580
    PSVersion: 5.1.14393.1369
    PSEdition: Desktop
    PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14393.1369
    BuildVersion: 10.0.14393.1369
    CLRVersion: 4.0.30319.42000
    WSManStackVersion: 3.0
    PSRemotingProtocolVersion: 2.3
    SerializationVersion: 1.1.0.1
    **********************
    VERBOSE: Transcript started, output file is C:\CloudDeployment\Logs\Register-AzureStack.20170801-021707.txt
    VERBOSE: Calling Register-AzureStack.ps1
    PS>TerminatingError(Register-AzureStack.ps1): "Parameter set cannot be resolved using the specified named parameters."
    >> TerminatingError(RegisterWithAzure.ps1): "Parameter set cannot be resolved using the specified named parameters."
    >> TerminatingError(RegisterWithAzure.ps1): "Parameter set cannot be resolved using the specified named parameters."
    C:\temp\RegisterWithAzure.ps1 : Parameter set cannot be resolved using the specified named parameters.
    At line:1 char:1
    + c:\temp\RegisterWithAzure.ps1 -azureSubscriptionId 73d8f9ee-081a-4980 ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [RegisterWithAzure.ps1], ParameterBindingException
        + FullyQualifiedErrorId : AmbiguousParameterSet,RegisterWithAzure.ps1

    and the sricpt stops

    any idea?

    Tuesday, August 1, 2017 10:59 AM

Answers

  • Hello Lutz,

    The error message indicates RegisterWithAzure.ps1  doesn’t like one of the values passed to one of these variables.

      

    Can you check the values?

    $SubID  $AADTenantID  $AADUserName 

     

    Example:

    PS C:\CloudDeployment\Setup\Activation\Bridge>   $SubID

    8b2ca751-4f32-4ac4-a132-a3a1f4f7f18c

     

    PS C:\CloudDeployment\Setup\Activation\Bridge> $AADTenantID

    PMDogfood.onmicrosoft.com

     

    PS C:\CloudDeployment\Setup\Activation\Bridge> $AADUserName

    AzureAdmin@PMDogfood.onmicrosoft.com

     

    Also – Can you verify your AAD Account has a valid subscription associated with it?

     

    Example:

    Login-AzureRmAccount -EnvironmentName "AzureCloud"

     

    Environment           : AzureCloud

    Account               : AzureAdmin@PMDogfood.onmicrosoft.com

    TenantId              : a542c100-0059-48fe-9f0e-b285fad09f32

    SubscriptionId        : 8b2ca751-4f32-4ac4-a132-a3a1f4f7f18c

    CurrentStorageAccount :

     

    Let me know what you find.

      

     Thanks,


    Gary Gallanes

    Tuesday, August 1, 2017 4:17 PM