none
Issues Executing Partner Center Cmdlets in Azure Func? RRS feed

  • Question

  • Whether I'm running locally in an Azure Function with VS Code or in Azure itself, I can never seem to get Connect-PartnerCenter to work. It always tells me that It found the command was found in PartnerCenter.NetCore (or PartnerCenter - I tried both ways) but it says that while it was found the module can't be loaded.

    I tried saving it off to a modules folder and referencing that way and just installing it manually but I always get that error. Thoughts or advice?


    • Edited by Scott [MC] Friday, August 2, 2019 2:53 PM Clarification
    Friday, August 2, 2019 2:39 PM

All replies

  • Saving the PartnerCenter.NetCore module to the modules folder is going to be the correct way to get it loaded.

    See if Enable-AzureRmAlias is included anywhere. By default it is commented out in the profile.ps1 generated by Visual Studio code. It's a bridge to allow rm commands to run on the az module. When I uncommented it I got an error that the module was already imported. Then when calling the Connect-PartnerCenter method I got the command was found but couldn't be loaded error. It thinks that it has loaded the PartnerCenter commands from the bridge, but they aren't actually included.

    Second, make sure you are calling "Import-Module 'PartnerCenter.NetCore'" in your function. Loading the files into the modules folder will make them available, but you still need to import them into the specific function.

    If neither of these solves the problem, could you please share the code for your function with any ids or passwords removed? 


    Monday, August 5, 2019 8:09 PM
    Moderator