Issue with WinRM and Azure AD Sync

NGUYEN Daniel 6 Reputation points
2022-06-14T15:43:58.98+00:00

Hello,

I'm currently working on a monitoring solution for a customer and they have their local AD synchronize on Azure AD with AD Connect.

They need to monitor the state of their synchronization and I found that some useful commands to do that like "Get-ADSyncRunProfileResult".

The issue is that I need to execute this command from an Ubuntu server using WinRM and Kerberos and when I try the command, I have the following error message :

Get-ADSyncRunProfileResult : Il n'existait pas de point de terminaison à l'écoute sur
net.pipe://localhost/ADSyncManagement pouvant accepter le message. Ceci est souvent dû à une adresse ou une action
SOAP incorrecte. S'il est présent, voir l'élément InnerException pour plus d'informations.
Au caractère D:\ADsync_snav\syncAD\syncAD.ps1:1 : 60

  • ... sync_snav\syncAD\Sync.txt" -Value (Get-ADSyncRunProfileResult| Select ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : ReadError: (Microsoft.Ident...ileResultCmdlet:GetADSyncRunProfileResultCmdlet) [Get-ADSy
    ncRunProfileResult], EndpointNotFoundException
  • FullyQualifiedErrorId : Microsoft.IdentityManagement.PowerShell.Cmdlet.GetADSyncRunProfileResultCmdlet

Sorry part of the message is in French but it basically say that "There is no endpoint listening on net.pipe://localhost/ADSyncManagement which is able to accept the message".

But when I execute Get-Command, I can all the ADSyncCommand, and when I execute "Get-ADSyncScheduler" I can see the configuration.

I found some informations on internet but nothing really help.

Can you help me please ?

PS : Here is the command i'm using.

/usr/local/nagios/libexec/winrm_command.py -H 'XXXX' -l 'XXXX' -x 'XXXX' -c 'Get-ADSyncRunProfileResult'

Thank you in advance.

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,807 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,896 questions
{count} votes

4 answers

Sort by: Most helpful
  1. rr-4098 1,766 Reputation points
    2022-06-17T13:50:11.96+00:00
    0 comments No comments

  2. NGUYEN Daniel 6 Reputation points
    2022-06-17T14:34:27.543+00:00

    Hello,

    Yes, the server is an Ubuntu 20 server, I think the main issue is that I have to use Powershell in admin mode and with the UAC, it's impossible to confirm from an Ubuntu server or maybe you have a solution for this without disabling the UAC ?

    Thanks in advance.


  3. rr-4098 1,766 Reputation points
    2022-06-18T09:11:08.153+00:00

    When you are running Powershell on the Ubuntu server, are using running it using "sudo"?

    https://stackoverflow.com/questions/66213658/how-to-sudo-with-powershell-elevate-powershell-running-a-command-as-admin-o


  4. rr-4098 1,766 Reputation points
    2022-06-20T14:01:50.537+00:00

    Is the Net.Pipe Listener Adapter service running on the remote server? Are you able to run this command from a Windows server without issue?


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.