You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
The fallback option to Get-ADObject is failing because we can't connect to the DC on port 9389. Even though we are going to eventually be connecting to the GC port to do the query, we still need to connect here first. Because of this, we fail to find our groups.
Expected behavior
We should be able to handle and find our groups. Either need to switch this to a true LDAP query or handle this a little bit better and call out that we don't have all the ports likely open to the server.
Script Output
Get-ADObject : Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running.
Inner Exception: at Microsoft.ActiveDirectory.Management.AdwsConnection.InitializeForAutoReconnect[TChannel](Boolean& isAutoReconnecting, TChannel& channel, ChannelFactory`1& chFactory, String endpointName, CommunicationException& commException)
at Microsoft.ActiveDirectory.Management.AdwsConnection.SearchAnObject(ADSearchRequest request)
at Microsoft.ActiveDirectory.Management.AdwsConnection.Search(ADSearchRequest request)
at Microsoft.ActiveDirectory.Management.ADWebServiceStoreAccess.Microsoft.ActiveDirectory.Management.IADSyncOperations.Search(ADSessionHandle handle, ADSearchRequest request)
at Microsoft.ActiveDirectory.Management.ADObjectSearcher.GetRootDSE()
at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.GetRootDSE()
at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.GetConnectedStore()
at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.GetCmdletSessionInfo()
at Microsoft.ActiveDirectory.Management.Commands.ADGetCmdletBase`3.ADGetCmdletBaseBeginCSRoutine()
at Microsoft.ActiveDirectory.Management.CmdletSubroutinePipeline.Invoke()
at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.BeginProcessing()
Position Message: At C:\temp\HealthChecker.ps1:14217 char:41
+ $adObject = Get-ADObject @params
+ ~~~~~~~~~~~~~~~~~~~~
Script Stack: at Get-ExchangeInformation<Process>, C:\temp\HealthChecker.ps1: line 14217
at Get-HealthCheckerExchangeServer<Process>, C:\temp\HealthChecker.ps1: line 15982
at Get-HealthCheckerData, C:\temp\HealthChecker.ps1: line 16790
at Invoke-HealthCheckerMainReport, C:\temp\HealthChecker.ps1: line 16860
at <ScriptBlock><End>, C:\temp\HealthChecker.ps1: line 17695
at <ScriptBlock>, <No file>: line 1
-----------------------------------
JSON Error Information
"Exception": {
"ErrorCode": 0,
"ServerName": "EX1.contoso.com",
"Message": "Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running.",
"Data": "System.Collections.ListDictionaryInternal",
"InnerException": "System.ServiceModel.EndpointNotFoundException: Could not connect to net.tcp://DC1.contoso.com:9389/ActiveDirectoryWebServices/Windows/Resource. The connection attempt lasted for a time span of 00:00:01.0016650. TCP error code 10061: No connection could be made because the target machine actively refused it 192.168.0.10:9389. ---\u003e System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 192.168.0.10:9389\r\n at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)\r\n at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)\r\n at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)\r\n --- End of inner exception stack trace ---\r\n\r\nServer stack trace: \r\n at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)\r\n at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)\r\n at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)\r\n at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)\r\n at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)\r\n at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)\r\n at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)\r\n at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)\r\n at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)\r\n at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)\r\n at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)\r\n at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)\r\n at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)\r\n\r\nException rethrown at [0]: \r\n at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)\r\n at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData\u0026 msgData, Int32 type)\r\n at Microsoft.ActiveDirectory.WebServices.Proxy.Resource.Get(Message request)\r\n at Microsoft.ActiveDirectory.Management.AdwsConnection.SearchAnObject(ADSearchRequest request)",
"TargetSite": "Void InitializeForAutoReconnect[TChannel](Boolean ByRef, TChannel ByRef, System.ServiceModel.ChannelFactory`1[TChannel] ByRef, System.String, System.ServiceModel.CommunicationException ByRef)",
"StackTrace": " at Microsoft.ActiveDirectory.Management.AdwsConnection.InitializeForAutoReconnect[TChannel](Boolean\u0026 isAutoReconnecting, TChannel\u0026 channel, ChannelFactory`1\u0026 chFactory, String endpointName, CommunicationException\u0026 commException)\r\n at Microsoft.ActiveDirectory.Management.AdwsConnection.SearchAnObject(ADSearchRequest request)\r\n at Microsoft.ActiveDirectory.Management.AdwsConnection.Search(ADSearchRequest request)\r\n at Microsoft.ActiveDirectory.Management.ADWebServiceStoreAccess.Microsoft.ActiveDirectory.Management.IADSyncOperations.Search(ADSessionHandle handle, ADSearchRequest request)\r\n at Microsoft.ActiveDirectory.Management.ADObjectSearcher.GetRootDSE()\r\n at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.GetRootDSE()\r\n at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.GetConnectedStore()\r\n at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.GetCmdletSessionInfo()\r\n at Microsoft.ActiveDirectory.Management.Commands.ADGetCmdletBase`3.ADGetCmdletBaseBeginCSRoutine()\r\n at Microsoft.ActiveDirectory.Management.CmdletSubroutinePipeline.Invoke()\r\n at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.BeginProcessing()",
"HelpLink": null,
"Source": "Microsoft.ActiveDirectory.Management",
"HResult": -2146233088
},
Additional context Get-ADComputer is working because we didn't force the DC that we are connecting to.
The text was updated successfully, but these errors were encountered:
Provide Version Number
24.12.05.1718
Describe the issue
The fallback option to
Get-ADObject
is failing because we can't connect to the DC on port 9389. Even though we are going to eventually be connecting to the GC port to do the query, we still need to connect here first. Because of this, we fail to find our groups.Expected behavior
We should be able to handle and find our groups. Either need to switch this to a true LDAP query or handle this a little bit better and call out that we don't have all the ports likely open to the server.
Script Output
JSON Error Information
Additional context
Get-ADComputer
is working because we didn't force the DC that we are connecting to.The text was updated successfully, but these errors were encountered: