I'm currently attempting to provision mailbox accounts with the use of a powershell command that is running under a windows service with a specific account set to the run the command. When this command executes from the windows service I recieve the following error:
An Active Directory error 0x80070035 occurred while searching for domain controllers in domain xxx.xxx.xxx: The network path was not found.
The command I'm executing is as follows:
C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\bin\exshell.psc1" -NoLogo -NonInteractive -Command "Enable-Mailbox -Identity 'cn=test user,ou=testou,dc=xxx,dc=xxx,dc=xxx' -Database exchserver1\sg1\db01 -domaincontroller DC1.xxx.xxx ;";
When I log in to this server and execute the same command from the Exchange Management Shell the script runs fine and creates the mailbox. Unfortunately when it runs from my Windows Service I get the error denoted above. Does anyone have any insight into what might be going on? My suspicion is that this is a required permision for the service account that is not set and causing the issue or the invocation of powershell through the command line can't search Active Directory.
Exchange Server Version: Exchange Server 2007
Operating System: Windows 2003 SP 2