FolderSync Fails with Event 'Error connecting to MSOnline'

book

Article ID: 100046102

calendar_today

Updated On:

Description

Error Message

** Exception Details **
System.Management.Automation.CommandNotFoundException: The term 'Connect-MsolService' 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 System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
   at System.Management.Automation.Runspaces.Pipeline.Invoke()
   at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
   at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
   at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.Invoke()
   at VaultSolutions.ArchiveAccelerator.Synch.vsPowerShell.RunCommand(String command, KeyValuePair`2[] commandParams)
   at VaultSolutions.ATFS.MSOnlinePSConnector.GetPS(String connectorName)
2019-08-08 11:46:49.886 [(T37) VSLLC:MSOnlinePSConnector] - Error connecting to MSOnline

Cause

This is because the Folder Sync server does not have the Azure Active Directory module for Windows PowerShell installed per the installation requirements.  

Resolution

  1. Install PackageManagement PowerShell Module.
  1. Install the package on the server or servers where Folder Sync will be configured.
  1. Open Windows PowerShell as an administrator and run the following command to install the MsOnline module.

Install-Module -Name MSOnline

If prompted to install the NuGet provider, enter Y.
If prompted to install the modules from the PSGallery, enter Y.
 

Issue/Introduction

Folder Sync failing with event 'Error Connecting to MSOnline'.