locked
Problems while registering AzureStack with Azure RRS feed

  • Question

  • Hi,

    I have a Problem registering Azurestack with Azure. I'm following this URL:
    https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-register

    and get this error while running the command Add-AZSregistration
    System.Management.Automation.RemoteException: The term 'New-AzureBridgeServicePrincipal' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    If I want to run the command New-AzureBridgeServicePrincipal the command is unknown. Is there a Special modul I have to load first?

    Thanks for any hint

    Carsten

    Friday, October 13, 2017 12:15 PM

Answers

  • Hi

    Just an update to the above, I think I have now been able to resolve the registration issue with my ASDK deployment.

    Looking at the Github history, there appears to have been very recent changes to the registration process. Previously the documentation specified running `RegisterWithAzure.ps1` but now mentions importing `RegisterWithAzure.psm1` and then running `Add-AzsRegistration`.

    Since I downloaded the ADSK and created the CloudBuilder.vhdx file about 2 weeks ago, I suspect that maybe these changes are not included in the version I have. This may be the reason the `New-AzureBridgeServicePrincipal` cmdlet is missing from my AzS-ERCS01 node as per the error above.

    I thought I would therefore try to register using the old registration method, and this appears to have registered successfully and I have also been able to access content from the Marketplace.  The command that I ran was as follows: -

    RegisterWithAzure.ps1 -azureSubscriptionId "YourID" -azureDirectoryTenantName "YourDirectory" -azureAccountId YourAccountName

    I had this script as I had also downloaded an older version of the AzureStack-Tools which contained a copy of this script in the Registration folder.

    I am not sure if this will resolve the issue for you cichy201 and Carsten Barth, but it may be worth looking and determining when you downloaded the ASDK and created the CloudBuilder.vhdx file.

    Regards

    Geoff


    Monday, October 16, 2017 4:37 PM

All replies

  • Did you import the RegisterWithAzure module? Assuming that you are in the folder where RegisterWithAzure.psm1 resides, run 
    Import-Module .\RegisterWithAzure.psm1
    and then retry Add-AzsRegistration 

    Friday, October 13, 2017 12:41 PM
  • Yes, I did. The command:
    Add-AZSregistration
    is only available if I Import this module.
    Friday, October 13, 2017 1:00 PM
  • Hello Carsten,

    It looks like you may not have the required PowerShell modules and tools Imported into your session.

    Can you run the following command to verify you have the AzureRm & AzureStack modules imported into your PowerShell session and paste back the output?

     

    Get-Module

      

    We apologize for any inconvenience and appreciate your time and interest in Azure Stack.

    If you continue experience any issues with ASDK release, feel free to contact us.

        

     Thanks,


    Gary Gallanes

    Friday, October 13, 2017 4:09 PM
  • Got the same issue with AzureStack Development Kit. AZS-ERCS01 doesn't have a module containing 'New-AzureBridgeServicePrincipal' cmdlet.

    As I wanted to add VM to AZS I had to do that through Powershell. Before you run PS commands make sure you edit AzureStack.ComputeAdmin module (under AzureStack-Tools\ComputeAdmin): comment out line 825 (AzureStack-Tools\ComputeAdmin), line 826: set return value to 'local' This is the only workaround I found so far is to add VM via Powershell. 



    UPDATE:

    Download updated Azure Stack Dev Kit version (2017-09-28). Issue resolved.

    Friday, October 13, 2017 5:39 PM
  • Hi,

    I have problem with this cmdlet:

    "WARNING: 2017-10-14.02-42-25: Creation of service principal failed:

    The term 'New-AzureBridgeServicePrincipal' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the

    path is correct and try again."

    I used it with this:

      Import-Module C:\Temp\RegisterWithAzure.psm1 -Force -verbose


      $YourCloudAdminCredential = "azurestack\cloudadmin"
      $YourAzureDirectoryTenantName  = " .onmicrosoft.com"
      $YourAzureSubscriptionId = " "
      $YourPrivilegedEndpoint = "AZS-ercs01"
      
    Add-AzsRegistration -CloudAdminCredential $YourCloudAdminCredential -AzureDirectoryTenantName $YourAzureDirectoryTenantName  -AzureSubscriptionId $YourAzureSubscriptionId -PrivilegedEndpoint $YourPrivilegedEndpoint -BillingModel Development

    My module:

    Script     3.4.1      AzureRM.Profile                                                                
    Script     4.4.1      AzureRM.Resources                                                     
    Script     1.2.11     Azurestack                                                                       
    Script     1.0.0.0    ISE                                                                                                                               
    Manifest   3.1.0.0    Microsoft.PowerShell.Management                                                                                   
    Manifest   3.1.0.0    Microsoft.PowerShell.Utility                                                                                                
    Script     0.0        RegisterWithAzure

    Saturday, October 14, 2017 12:45 PM
  • Hi,

    I have the same modules as cichy201.

    Cheers

    Carsten

    Monday, October 16, 2017 7:07 AM
  • Hi

    I have the same issue mentioned above. I have confirmed that the required modules are loaded into the session but still receive the following error: -

    VERBOSE: 2017-10-16.02-27-13: Waiting 10 seconds and trying again...
    VERBOSE: 2017-10-16.02-27-23: Creating Azure Active Directory service principal in tenant: 9a50eba8-7568-447a-bcb9-27a0d464aa80. Attempt 2 of 3
    WARNING: 2017-10-16.02-27-23: Creation of service principal failed:
    The term 'New-AzureBridgeServicePrincipal' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, ve
    rify that the path is correct and try again.
    VERBOSE: 2017-10-16.02-27-23: Waiting 10 seconds and trying again...
    VERBOSE: 2017-10-16.02-27-33: *********************** Ending registration action during RegistrationWorker ***********************
    
    
    Logs can be found at: C:\MASLogs\AzureStack.AzureRegistration.2017-10-16.01-26-29.log  and  \\AzS-ERCS01\c$\maslogs 
    System.Management.Automation.RemoteException: The term 'New-AzureBridgeServicePrincipal' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the 
    spelling of the name, or if a path was included, verify that the path is correct and try again.
    At C:\AzureStack-Tools-master\Registration\RegisterWithAzure.psm1:1106 char:5
    +     throw "Logs can be found at: $Global:AzureRegistrationLog  and  \ ...
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (Logs can be fou... and try again.:String) [], RuntimeException
        + FullyQualifiedErrorId : Logs can be found at: C:\MASLogs\AzureStack.AzureRegistration.2017-10-16.01-26-29.log  and  \\AzS-ERCS01\c$\maslogs 
        System.Management.Automation.RemoteException: The term 'New-AzureBridgeServicePrincipal' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the 
        spelling of the name, or if a path was included, verify that the path is correct and try again.
     
    
    PS C:\AzureStack-Tools-master> 

    The log file mentioned does not contain any additional information, only that New-AzureBridgeServicePrincipal` is not recognized.

    Is this likely to be related to the recent update of AzureRM to version 1.2.11?

    Any way we can resolve this or workaround it as it is holding us up demonstrating Azure Stack to our stakeholders.

    Thanks

    Geoff




    • Edited by Geoff.Carr Monday, October 16, 2017 1:45 PM
    Monday, October 16, 2017 1:36 PM
  • Hi

    Just an update to the above, I think I have now been able to resolve the registration issue with my ASDK deployment.

    Looking at the Github history, there appears to have been very recent changes to the registration process. Previously the documentation specified running `RegisterWithAzure.ps1` but now mentions importing `RegisterWithAzure.psm1` and then running `Add-AzsRegistration`.

    Since I downloaded the ADSK and created the CloudBuilder.vhdx file about 2 weeks ago, I suspect that maybe these changes are not included in the version I have. This may be the reason the `New-AzureBridgeServicePrincipal` cmdlet is missing from my AzS-ERCS01 node as per the error above.

    I thought I would therefore try to register using the old registration method, and this appears to have registered successfully and I have also been able to access content from the Marketplace.  The command that I ran was as follows: -

    RegisterWithAzure.ps1 -azureSubscriptionId "YourID" -azureDirectoryTenantName "YourDirectory" -azureAccountId YourAccountName

    I had this script as I had also downloaded an older version of the AzureStack-Tools which contained a copy of this script in the Registration folder.

    I am not sure if this will resolve the issue for you cichy201 and Carsten Barth, but it may be worth looking and determining when you downloaded the ASDK and created the CloudBuilder.vhdx file.

    Regards

    Geoff


    Monday, October 16, 2017 4:37 PM
  • Same Problem at my ASDK. My cloudbuilder.vhdx was to old. I decided to do a new Installation and now the marketplace syndication is working.

    Thank you

    Carsten

    Thursday, October 19, 2017 10:56 AM