Azure Local 23H2 - Add-Server functionality not working

Vaughn DeFouw 81 Reputation points
2025-02-14T18:30:17.7+00:00

We're trying to add a server back into a cluster that was failed and when we try to run the "Add-Server" command specified here: https://learn.microsoft.com/en-us/azure/azure-local/manage/add-server?view=azloc-24112

It gives this error:

VERBOSE: Looking up shared vhd product drive letter. WARNING: Unable to find volume with label Deployment VERBOSE: Suppressed Warning Unknown category for 'NuGet'::'GetDynamicOptions': 'Provider' The 'Add-Server' command was found in the module 'ScaleNodeOperations', but the module could not be loaded. For more information, run 'Import-Module ScaleNodeOperations'. + CategoryInfo : ObjectNotFound: (Add-Server:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

This is when attached to the cluster or from an individual node using the LCM account. ScaleNodeOperations gives this error:

Import-Module : The specified module 'ScaleNodeOperations' was not loaded because no valid module file was found in any module directory. + CategoryInfo : ResourceUnavailable: (ScaleNodeOperations:String) [Import-Module], FileNotFoundException + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Azure Local
{count} vote

1 answer

Sort by: Most helpful
  1. Mounika Reddy Anumandla 6,575 Reputation points Microsoft External Staff Moderator
    2025-06-23T07:04:39.3633333+00:00

    The error you're seeing clearly indicates that the ScaleNodeOperations PowerShell module is missing from the system:

    Import-Module : The specified module 'ScaleNodeOperations' was not loaded because no valid module file was found in any module directory. 
    

    This prevents the Add-Server cmdlet from running, since it's part of that module.

    Verify Required Environment

    Ensure you're doing this on a supported Azure Local server environment, such as Azure Stack HCI (especially if using 23H2), and logged in as Local Cluster Manager (LCM) with elevated (admin) privileges.

    Check for Module Location Manually

    Check if ScaleNodeOperations exists:

    Get-Module -ListAvailable ScaleNodeOperations
    

    If it doesn't appear, try looking manually:

    Get-ChildItem -Path $env:ProgramFiles\WindowsPowerShell\Modules\ScaleNodeOperations -Recurse
    

    Or search globally:

    
    Get-ChildItem -Path "C:\Program Files\WindowsPowerShell\Modules" -Recurse -Directory | Where-Object { $_.N
    
    
    

    Fix or Reinstall the Module. https://learn.microsoft.com/en-us/azure/azure-local/manage/add-server?view=azloc-24112

    Make Sure NuGet Provider Is Installed (if using PSGallery)

    The warning about NuGet suggests you might also be missing the NuGet provider:

    Install-PackageProvider -Name NuGet -Force
    

    And trust PSGallery:

    Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
    

    After confirming the module loads successfully:Retry the Add-Server Command

    Hope it helps!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.