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!