![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Looking for domain controllers Hi everyone, I try to run as powershell script on an Exchange 2007 server. Locally, it works OK. Now I want to run it remotely : a VB .net program on a workstation creates a remote WMI process on the server that runs "cmd.exe /c powershell.exe -PSConsoleFile path_to_exchange_consolefile -command my_script.ps1". And now, each time I have to get something related to AD (get-mailbox, or get-adsite, for instance), I get this error : An Active directory error 0x80072020 occurred when looking for domain controllers in domain cbas.int: An operations error occurred. Nothing useful on google. Can anybody help ? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Looking for domain controllers From the shell cut/paste this... what do you get? I am curious if your having DCLocator problems. $context = new-object System.DirectoryServices.ActiveDirectory.DirectoryContext("Domain","dns.domain.name") $dclist = [System.DirectoryServices.ActiveDirectory.DomainController]::findall($context) $dclist Brandon Shell --------------- Blog: http://www.bsonposh.com/ PSH Scripts Project: www.codeplex.com/psobject g> Hi everyone, g> I try to run as powershell script on an Exchange 2007 server. g> Locally, it g> works OK. Now I want to run it remotely : a VB .net program on a g> workstation g> creates a remote WMI process on the server that runs "cmd.exe /c g> powershell.exe -PSConsoleFile path_to_exchange_consolefile -command g> my_script.ps1". g> And now, each time I have to get something related to AD g> (get-mailbox, or g> get-adsite, for instance), I get this error : g> An Active directory error 0x80072020 occurred when looking for domain g> controllers in domain cbas.int: An operations error occurred. g> Nothing useful on google. g> Can anybody help ? |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Looking for domain controllers Thanks for your reply. It seems to me it's OK : Forest : abc.local CurrentTime : 23/10/2007 15:48:34 HighestCommittedUsn : 1906373 OSVersion : Windows Server 2003 Roles : {SchemaRole, NamingRole} Domain : abc.local IPAddress : x.y.0.10 SiteName : BxMeriadeck SyncFromAllServersCallback : InboundConnections : {65931b65-25c5-4558-9189-71a25989e94a, 93c3f784-9bac-464d-9ac3-662906f87ad1, debcc3a0-0e7c -4cca-89b7-271d2b80d0a8} OutboundConnections : {fab39386-d703-41db-96f5-020d62cea7ab} Name : DC2.abc.local Partitions : {DC=abc,DC=local, CN=Configuration,DC=abc,DC=local, CN=Schema,CN=Configuration,DC=abc,DC=in t, DC=DomainDnsZones,DC=abc,DC=local, DC=ForestDnsZones,DC=abc,DC=local} Forest : abc.local CurrentTime : 23/10/2007 15:50:00 HighestCommittedUsn : 439046 OSVersion : Windows Server 2003 Roles : {} Domain : abc.local IPAddress : a.b.10.110 SiteName : ByeMarines SyncFromAllServersCallback : InboundConnections : {c7124da7-2c02-4b59-9bb6-379bdc55978f} OutboundConnections : {} Name : DC3.abc.local Partitions : {DC=abc,DC=local, CN=Configuration,DC=abc,DC=local, CN=Schema,CN=Configuration,DC=abc,DC=in t, DC=DomainDnsZones,DC=abc,DC=local, DC=ForestDnsZones,DC=abc,DC=local} Forest : abc.local CurrentTime : 23/10/2007 15:49:18 HighestCommittedUsn : 483059 OSVersion : Windows Server 2003 Roles : {} Domain : abc.local IPAddress : w.101.18.4 SiteName : PauRepublique SyncFromAllServersCallback : InboundConnections : {3f9a4bdc-eb57-483d-83c7-5d8735d6c82c} OutboundConnections : {} Name : DC4.abc.local Partitions : {DC=abc,DC=local, CN=Configuration,DC=abc,DC=local, CN=Schema,CN=Configuration,DC=abc,DC=in t, DC=DomainDnsZones,DC=abc,DC=local, DC=ForestDnsZones,DC=abc,DC=local} Forest : abc.local CurrentTime : 23/10/2007 15:49:19 HighestCommittedUsn : 662862 OSVersion : Windows Server 2003 Roles : {PdcRole, RidRole, InfrastructureRole} Domain : abc.local IPAddress : x.y.0.38 SiteName : BxMeriadeck SyncFromAllServersCallback : InboundConnections : {fab39386-d703-41db-96f5-020d62cea7ab} OutboundConnections : {93c3f784-9bac-464d-9ac3-662906f87ad1} Name : DC1.abc.local Partitions : {DC=abc,DC=local, CN=Configuration,DC=abc,DC=local, CN=Schema,CN=Configuration,DC=abc,DC=in t, DC=DomainDnsZones,DC=abc,DC=local, DC=ForestDnsZones,DC=abc,DC=local} "Brandon Shell [MVP]" wrote: Quote: > From the shell cut/paste this... what do you get? I am curious if your having > DCLocator problems. > > $context = new-object System.DirectoryServices.ActiveDirectory.DirectoryContext("Domain","dns.domain.name") > $dclist = [System.DirectoryServices.ActiveDirectory.DomainController]::findall($context) > $dclist > > Brandon Shell > --------------- > Blog: http://www.bsonposh.com/ > PSH Scripts Project: www.codeplex.com/psobject > > g> Hi everyone, > g> I try to run as powershell script on an Exchange 2007 server. > g> Locally, it > g> works OK. Now I want to run it remotely : a VB .net program on a > g> workstation > g> creates a remote WMI process on the server that runs "cmd.exe /c > g> powershell.exe -PSConsoleFile path_to_exchange_consolefile -command > g> my_script.ps1". > g> And now, each time I have to get something related to AD > g> (get-mailbox, or > g> get-adsite, for instance), I get this error : > g> An Active directory error 0x80072020 occurred when looking for domain > g> controllers in domain cbas.int: An operations error occurred. > g> Nothing useful on google. > g> Can anybody help ? > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Looking for domain controllers That is curious. You often get that error if you do a server-less connection, but I would expect the command I gave you to fail as well, but we did provide the dns name so it could locate a DC that way. Lets try this In your script can you add this? [ADSI]"" Brandon Shell --------------- Blog: http://www.bsonposh.com/ PSH Scripts Project: www.codeplex.com/psobject g> Thanks for your reply. g> g> It seems to me it's OK : g> g> Forest : abc.local g> CurrentTime : 23/10/2007 15:48:34 g> HighestCommittedUsn : 1906373 g> OSVersion : Windows Server 2003 g> Roles : {SchemaRole, NamingRole} g> Domain : abc.local g> IPAddress : x.y.0.10 g> SiteName : BxMeriadeck g> SyncFromAllServersCallback : g> InboundConnections : {65931b65-25c5-4558-9189-71a25989e94a, g> 93c3f784-9bac-464d-9ac3-662906f87ad1, debcc3a0-0e7c g> -4cca-89b7-271d2b80d0a8} g> OutboundConnections : {fab39386-d703-41db-96f5-020d62cea7ab} g> Name : DC2.abc.local g> Partitions : {DC=abc,DC=local, g> CN=Configuration,DC=abc,DC=local, g> CN=Schema,CN=Configuration,DC=abc,DC=in g> t, DC=DomainDnsZones,DC=abc,DC=local, g> DC=ForestDnsZones,DC=abc,DC=local} g> Forest : abc.local g> CurrentTime : 23/10/2007 15:50:00 g> HighestCommittedUsn : 439046 g> OSVersion : Windows Server 2003 g> Roles : {} g> Domain : abc.local g> IPAddress : a.b.10.110 g> SiteName : ByeMarines g> SyncFromAllServersCallback : g> InboundConnections : {c7124da7-2c02-4b59-9bb6-379bdc55978f} g> OutboundConnections : {} g> Name : DC3.abc.local g> Partitions : {DC=abc,DC=local, g> CN=Configuration,DC=abc,DC=local, g> CN=Schema,CN=Configuration,DC=abc,DC=in g> t, DC=DomainDnsZones,DC=abc,DC=local, g> DC=ForestDnsZones,DC=abc,DC=local} g> Forest : abc.local g> CurrentTime : 23/10/2007 15:49:18 g> HighestCommittedUsn : 483059 g> OSVersion : Windows Server 2003 g> Roles : {} g> Domain : abc.local g> IPAddress : w.101.18.4 g> SiteName : PauRepublique g> SyncFromAllServersCallback : g> InboundConnections : {3f9a4bdc-eb57-483d-83c7-5d8735d6c82c} g> OutboundConnections : {} g> Name : DC4.abc.local g> Partitions : {DC=abc,DC=local, g> CN=Configuration,DC=abc,DC=local, g> CN=Schema,CN=Configuration,DC=abc,DC=in g> t, DC=DomainDnsZones,DC=abc,DC=local, g> DC=ForestDnsZones,DC=abc,DC=local} g> Forest : abc.local g> CurrentTime : 23/10/2007 15:49:19 g> HighestCommittedUsn : 662862 g> OSVersion : Windows Server 2003 g> Roles : {PdcRole, RidRole, InfrastructureRole} g> Domain : abc.local g> IPAddress : x.y.0.38 g> SiteName : BxMeriadeck g> SyncFromAllServersCallback : g> InboundConnections : {fab39386-d703-41db-96f5-020d62cea7ab} g> OutboundConnections : {93c3f784-9bac-464d-9ac3-662906f87ad1} g> Name : DC1.abc.local g> Partitions : {DC=abc,DC=local, g> CN=Configuration,DC=abc,DC=local, g> CN=Schema,CN=Configuration,DC=abc,DC=in g> t, DC=DomainDnsZones,DC=abc,DC=local, g> DC=ForestDnsZones,DC=abc,DC=local} g> "Brandon Shell [MVP]" wrote: g> Quote: Quote: >> From the shell cut/paste this... what do you get? I am curious if >> your having DCLocator problems. >> >> $context = new-object >> System.DirectoryServices.ActiveDirectory.DirectoryContext("Domain","d >> ns.domain.name") >> >> $dclist = >> [System.DirectoryServices.ActiveDirectory.DomainController]::findall( >> $context) >> >> $dclist >> >> Brandon Shell >> --------------- >> Blog: http://www.bsonposh.com/ >> PSH Scripts Project: www.codeplex.com/psobject >> g> Hi everyone, >> g> I try to run as powershell script on an Exchange 2007 server. >> g> Locally, it >> g> works OK. Now I want to run it remotely : a VB .net program on a >> g> workstation >> g> creates a remote WMI process on the server that runs "cmd.exe /c >> g> powershell.exe -PSConsoleFile path_to_exchange_consolefile >> -command >> g> my_script.ps1". >> g> And now, each time I have to get something related to AD >> g> (get-mailbox, or >> g> get-adsite, for instance), I get this error : >> g> An Active directory error 0x80072020 occurred when looking for >> domain >> g> controllers in domain cbas.int: An operations error occurred. >> g> Nothing useful on google. >> g> Can anybody help ? |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Looking for domain controllers When I run [ADSI]"" in my exchange powershell console, I get this : distinguishedName ----------------- {DC=abc,DC=local} I think this is still OK. In fact, I guess the problem is that I want to run this from another computer. I searched a bit on the internet, and I got the impression that, as of today, powershell does not work on remote computers, and we have to wait until powershell 2.0. When I run the script containg [ADSI]"" from another computer, I get this : " Laurent "Brandon Shell [MVP]" wrote: Quote: > That is curious. You often get that error if you do a server-less connection, > but I would expect the command I gave you to fail as well, but we did provide > the dns name so it could locate a DC that way. Lets try this In your script > can you add this? > > [ADSI]"" > > Brandon Shell > --------------- > Blog: http://www.bsonposh.com/ > PSH Scripts Project: www.codeplex.com/psobject > > g> Thanks for your reply. > g> > g> It seems to me it's OK : > g> > g> Forest : abc.local > g> CurrentTime : 23/10/2007 15:48:34 > g> HighestCommittedUsn : 1906373 > g> OSVersion : Windows Server 2003 > g> Roles : {SchemaRole, NamingRole} > g> Domain : abc.local > g> IPAddress : x.y.0.10 > g> SiteName : BxMeriadeck > g> SyncFromAllServersCallback : > g> InboundConnections : {65931b65-25c5-4558-9189-71a25989e94a, > g> 93c3f784-9bac-464d-9ac3-662906f87ad1, debcc3a0-0e7c > g> -4cca-89b7-271d2b80d0a8} > g> OutboundConnections : {fab39386-d703-41db-96f5-020d62cea7ab} > g> Name : DC2.abc.local > g> Partitions : {DC=abc,DC=local, > g> CN=Configuration,DC=abc,DC=local, > g> CN=Schema,CN=Configuration,DC=abc,DC=in > g> t, DC=DomainDnsZones,DC=abc,DC=local, > g> DC=ForestDnsZones,DC=abc,DC=local} > g> Forest : abc.local > g> CurrentTime : 23/10/2007 15:50:00 > g> HighestCommittedUsn : 439046 > g> OSVersion : Windows Server 2003 > g> Roles : {} > g> Domain : abc.local > g> IPAddress : a.b.10.110 > g> SiteName : ByeMarines > g> SyncFromAllServersCallback : > g> InboundConnections : {c7124da7-2c02-4b59-9bb6-379bdc55978f} > g> OutboundConnections : {} > g> Name : DC3.abc.local > g> Partitions : {DC=abc,DC=local, > g> CN=Configuration,DC=abc,DC=local, > g> CN=Schema,CN=Configuration,DC=abc,DC=in > g> t, DC=DomainDnsZones,DC=abc,DC=local, > g> DC=ForestDnsZones,DC=abc,DC=local} > g> Forest : abc.local > g> CurrentTime : 23/10/2007 15:49:18 > g> HighestCommittedUsn : 483059 > g> OSVersion : Windows Server 2003 > g> Roles : {} > g> Domain : abc.local > g> IPAddress : w.101.18.4 > g> SiteName : PauRepublique > g> SyncFromAllServersCallback : > g> InboundConnections : {3f9a4bdc-eb57-483d-83c7-5d8735d6c82c} > g> OutboundConnections : {} > g> Name : DC4.abc.local > g> Partitions : {DC=abc,DC=local, > g> CN=Configuration,DC=abc,DC=local, > g> CN=Schema,CN=Configuration,DC=abc,DC=in > g> t, DC=DomainDnsZones,DC=abc,DC=local, > g> DC=ForestDnsZones,DC=abc,DC=local} > g> Forest : abc.local > g> CurrentTime : 23/10/2007 15:49:19 > g> HighestCommittedUsn : 662862 > g> OSVersion : Windows Server 2003 > g> Roles : {PdcRole, RidRole, InfrastructureRole} > g> Domain : abc.local > g> IPAddress : x.y.0.38 > g> SiteName : BxMeriadeck > g> SyncFromAllServersCallback : > g> InboundConnections : {fab39386-d703-41db-96f5-020d62cea7ab} > g> OutboundConnections : {93c3f784-9bac-464d-9ac3-662906f87ad1} > g> Name : DC1.abc.local > g> Partitions : {DC=abc,DC=local, > g> CN=Configuration,DC=abc,DC=local, > g> CN=Schema,CN=Configuration,DC=abc,DC=in > g> t, DC=DomainDnsZones,DC=abc,DC=local, > g> DC=ForestDnsZones,DC=abc,DC=local} > g> "Brandon Shell [MVP]" wrote: > g> Quote: Quote: > >> From the shell cut/paste this... what do you get? I am curious if > >> your having DCLocator problems. > >> > >> $context = new-object > >> System.DirectoryServices.ActiveDirectory.DirectoryContext("Domain","d > >> ns.domain.name") > >> > >> $dclist = > >> [System.DirectoryServices.ActiveDirectory.DomainController]::findall( > >> $context) > >> > >> $dclist > >> > >> Brandon Shell > >> --------------- > >> Blog: http://www.bsonposh.com/ > >> PSH Scripts Project: www.codeplex.com/psobject > >> g> Hi everyone, > >> g> I try to run as powershell script on an Exchange 2007 server. > >> g> Locally, it > >> g> works OK. Now I want to run it remotely : a VB .net program on a > >> g> workstation > >> g> creates a remote WMI process on the server that runs "cmd.exe /c > >> g> powershell.exe -PSConsoleFile path_to_exchange_consolefile > >> -command > >> g> my_script.ps1". > >> g> And now, each time I have to get something related to AD > >> g> (get-mailbox, or > >> g> get-adsite, for instance), I get this error : > >> g> An Active directory error 0x80072020 occurred when looking for > >> domain > >> g> controllers in domain cbas.int: An operations error occurred. > >> g> Nothing useful on google. > >> g> Can anybody help ? > > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Looking for domain controllers RE: Remote Powershell You can do a large quantity of things remotely, but you are correct that there are some functions that must run in a local instance of powershell (i.e. CMDLets) If your speaking of the Exchange CMDLets you can install them remotely. On the remote machine you will have to have powershell and Exchange Snap-ins, but if you have both you can manage exchange just fine. "guruperplexe" <guruperplexe@xxxxxx> wrote in message news:B0DB3BDB-7410-4AFF-AF81-E22201CAB5E5@xxxxxx Quote: > When I run [ADSI]"" in my exchange powershell console, I get this : > distinguishedName > ----------------- > {DC=abc,DC=local} > > I think this is still OK. In fact, I guess the problem is that I want to > run > this from another computer. I searched a bit on the internet, and I got > the > impression that, as of today, powershell does not work on remote > computers, > and we have to wait until powershell 2.0. When I run the script containg > [ADSI]"" from another computer, I get this : > " > > Laurent > > > "Brandon Shell [MVP]" wrote: > Quote: >> That is curious. You often get that error if you do a server-less >> connection, >> but I would expect the command I gave you to fail as well, but we did >> provide >> the dns name so it could locate a DC that way. Lets try this In your >> script >> can you add this? >> >> [ADSI]"" >> >> Brandon Shell >> --------------- >> Blog: http://www.bsonposh.com/ >> PSH Scripts Project: www.codeplex.com/psobject >> >> g> Thanks for your reply. >> g> >> g> It seems to me it's OK : >> g> >> g> Forest : abc.local >> g> CurrentTime : 23/10/2007 15:48:34 >> g> HighestCommittedUsn : 1906373 >> g> OSVersion : Windows Server 2003 >> g> Roles : {SchemaRole, NamingRole} >> g> Domain : abc.local >> g> IPAddress : x.y.0.10 >> g> SiteName : BxMeriadeck >> g> SyncFromAllServersCallback : >> g> InboundConnections : {65931b65-25c5-4558-9189-71a25989e94a, >> g> 93c3f784-9bac-464d-9ac3-662906f87ad1, debcc3a0-0e7c >> g> -4cca-89b7-271d2b80d0a8} >> g> OutboundConnections : {fab39386-d703-41db-96f5-020d62cea7ab} >> g> Name : DC2.abc.local >> g> Partitions : {DC=abc,DC=local, >> g> CN=Configuration,DC=abc,DC=local, >> g> CN=Schema,CN=Configuration,DC=abc,DC=in >> g> t, DC=DomainDnsZones,DC=abc,DC=local, >> g> DC=ForestDnsZones,DC=abc,DC=local} >> g> Forest : abc.local >> g> CurrentTime : 23/10/2007 15:50:00 >> g> HighestCommittedUsn : 439046 >> g> OSVersion : Windows Server 2003 >> g> Roles : {} >> g> Domain : abc.local >> g> IPAddress : a.b.10.110 >> g> SiteName : ByeMarines >> g> SyncFromAllServersCallback : >> g> InboundConnections : {c7124da7-2c02-4b59-9bb6-379bdc55978f} >> g> OutboundConnections : {} >> g> Name : DC3.abc.local >> g> Partitions : {DC=abc,DC=local, >> g> CN=Configuration,DC=abc,DC=local, >> g> CN=Schema,CN=Configuration,DC=abc,DC=in >> g> t, DC=DomainDnsZones,DC=abc,DC=local, >> g> DC=ForestDnsZones,DC=abc,DC=local} >> g> Forest : abc.local >> g> CurrentTime : 23/10/2007 15:49:18 >> g> HighestCommittedUsn : 483059 >> g> OSVersion : Windows Server 2003 >> g> Roles : {} >> g> Domain : abc.local >> g> IPAddress : w.101.18.4 >> g> SiteName : PauRepublique >> g> SyncFromAllServersCallback : >> g> InboundConnections : {3f9a4bdc-eb57-483d-83c7-5d8735d6c82c} >> g> OutboundConnections : {} >> g> Name : DC4.abc.local >> g> Partitions : {DC=abc,DC=local, >> g> CN=Configuration,DC=abc,DC=local, >> g> CN=Schema,CN=Configuration,DC=abc,DC=in >> g> t, DC=DomainDnsZones,DC=abc,DC=local, >> g> DC=ForestDnsZones,DC=abc,DC=local} >> g> Forest : abc.local >> g> CurrentTime : 23/10/2007 15:49:19 >> g> HighestCommittedUsn : 662862 >> g> OSVersion : Windows Server 2003 >> g> Roles : {PdcRole, RidRole, InfrastructureRole} >> g> Domain : abc.local >> g> IPAddress : x.y.0.38 >> g> SiteName : BxMeriadeck >> g> SyncFromAllServersCallback : >> g> InboundConnections : {fab39386-d703-41db-96f5-020d62cea7ab} >> g> OutboundConnections : {93c3f784-9bac-464d-9ac3-662906f87ad1} >> g> Name : DC1.abc.local >> g> Partitions : {DC=abc,DC=local, >> g> CN=Configuration,DC=abc,DC=local, >> g> CN=Schema,CN=Configuration,DC=abc,DC=in >> g> t, DC=DomainDnsZones,DC=abc,DC=local, >> g> DC=ForestDnsZones,DC=abc,DC=local} >> g> "Brandon Shell [MVP]" wrote: >> g> Quote: >> >> From the shell cut/paste this... what do you get? I am curious if >> >> your having DCLocator problems. >> >> >> >> $context = new-object >> >> System.DirectoryServices.ActiveDirectory.DirectoryContext("Domain","d >> >> ns.domain.name") >> >> >> >> $dclist = >> >> [System.DirectoryServices.ActiveDirectory.DomainController]::findall( >> >> $context) >> >> >> >> $dclist >> >> >> >> Brandon Shell >> >> --------------- >> >> Blog: http://www.bsonposh.com/ >> >> PSH Scripts Project: www.codeplex.com/psobject >> >> g> Hi everyone, >> >> g> I try to run as powershell script on an Exchange 2007 server. >> >> g> Locally, it >> >> g> works OK. Now I want to run it remotely : a VB .net program on a >> >> g> workstation >> >> g> creates a remote WMI process on the server that runs "cmd.exe /c >> >> g> powershell.exe -PSConsoleFile path_to_exchange_consolefile >> >> -command >> >> g> my_script.ps1". >> >> g> And now, each time I have to get something related to AD >> >> g> (get-mailbox, or >> >> g> get-adsite, for instance), I get this error : >> >> g> An Active directory error 0x80072020 occurred when looking for >> >> domain >> >> g> controllers in domain cbas.int: An operations error occurred. >> >> g> Nothing useful on google. >> >> g> Can anybody help ? >> >> |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Looking for domain controllers I understand, but I just want to have the server run a powershell script. There is nothing installed on the client PC, it just tells WMI to launch powershell on the server ... "Brandon Shell [MVP]" wrote: Quote: > RE: Remote Powershell > > You can do a large quantity of things remotely, but you are correct that > there are some functions that must run in a local instance of powershell > (i.e. CMDLets) If your speaking of the Exchange CMDLets you can install them > remotely. On the remote machine you will have to have powershell and > Exchange Snap-ins, but if you have both you can manage exchange just fine. > "guruperplexe" <guruperplexe@xxxxxx> wrote in message > news:B0DB3BDB-7410-4AFF-AF81-E22201CAB5E5@xxxxxx Quote: > > When I run [ADSI]"" in my exchange powershell console, I get this : > > distinguishedName > > ----------------- > > {DC=abc,DC=local} > > > > I think this is still OK. In fact, I guess the problem is that I want to > > run > > this from another computer. I searched a bit on the internet, and I got > > the > > impression that, as of today, powershell does not work on remote > > computers, > > and we have to wait until powershell 2.0. When I run the script containg > > [ADSI]"" from another computer, I get this : > > " > > > > Laurent > > > > > > "Brandon Shell [MVP]" wrote: > > Quote: > >> That is curious. You often get that error if you do a server-less > >> connection, > >> but I would expect the command I gave you to fail as well, but we did > >> provide > >> the dns name so it could locate a DC that way. Lets try this In your > >> script > >> can you add this? > >> > >> [ADSI]"" > >> > >> Brandon Shell > >> --------------- > >> Blog: http://www.bsonposh.com/ > >> PSH Scripts Project: www.codeplex.com/psobject > >> > >> g> Thanks for your reply. > >> g> > >> g> It seems to me it's OK : > >> g> > >> g> Forest : abc.local > >> g> CurrentTime : 23/10/2007 15:48:34 > >> g> HighestCommittedUsn : 1906373 > >> g> OSVersion : Windows Server 2003 > >> g> Roles : {SchemaRole, NamingRole} > >> g> Domain : abc.local > >> g> IPAddress : x.y.0.10 > >> g> SiteName : BxMeriadeck > >> g> SyncFromAllServersCallback : > >> g> InboundConnections : {65931b65-25c5-4558-9189-71a25989e94a, > >> g> 93c3f784-9bac-464d-9ac3-662906f87ad1, debcc3a0-0e7c > >> g> -4cca-89b7-271d2b80d0a8} > >> g> OutboundConnections : {fab39386-d703-41db-96f5-020d62cea7ab} > >> g> Name : DC2.abc.local > >> g> Partitions : {DC=abc,DC=local, > >> g> CN=Configuration,DC=abc,DC=local, > >> g> CN=Schema,CN=Configuration,DC=abc,DC=in > >> g> t, DC=DomainDnsZones,DC=abc,DC=local, > >> g> DC=ForestDnsZones,DC=abc,DC=local} > >> g> Forest : abc.local > >> g> CurrentTime : 23/10/2007 15:50:00 > >> g> HighestCommittedUsn : 439046 > >> g> OSVersion : Windows Server 2003 > >> g> Roles : {} > >> g> Domain : abc.local > >> g> IPAddress : a.b.10.110 > >> g> SiteName : ByeMarines > >> g> SyncFromAllServersCallback : > >> g> InboundConnections : {c7124da7-2c02-4b59-9bb6-379bdc55978f} > >> g> OutboundConnections : {} > >> g> Name : DC3.abc.local > >> g> Partitions : {DC=abc,DC=local, > >> g> CN=Configuration,DC=abc,DC=local, > >> g> CN=Schema,CN=Configuration,DC=abc,DC=in > >> g> t, DC=DomainDnsZones,DC=abc,DC=local, > >> g> DC=ForestDnsZones,DC=abc,DC=local} > >> g> Forest : abc.local > >> g> CurrentTime : 23/10/2007 15:49:18 > >> g> HighestCommittedUsn : 483059 > >> g> OSVersion : Windows Server 2003 > >> g> Roles : {} > >> g> Domain : abc.local > >> g> IPAddress : w.101.18.4 > >> g> SiteName : PauRepublique > >> g> SyncFromAllServersCallback : > >> g> InboundConnections : {3f9a4bdc-eb57-483d-83c7-5d8735d6c82c} > >> g> OutboundConnections : {} > >> g> Name : DC4.abc.local > >> g> Partitions : {DC=abc,DC=local, > >> g> CN=Configuration,DC=abc,DC=local, > >> g> CN=Schema,CN=Configuration,DC=abc,DC=in > >> g> t, DC=DomainDnsZones,DC=abc,DC=local, > >> g> DC=ForestDnsZones,DC=abc,DC=local} > >> g> Forest : abc.local > >> g> CurrentTime : 23/10/2007 15:49:19 > >> g> HighestCommittedUsn : 662862 > >> g> OSVersion : Windows Server 2003 > >> g> Roles : {PdcRole, RidRole, InfrastructureRole} > >> g> Domain : abc.local > >> g> IPAddress : x.y.0.38 > >> g> SiteName : BxMeriadeck > >> g> SyncFromAllServersCallback : > >> g> InboundConnections : {fab39386-d703-41db-96f5-020d62cea7ab} > >> g> OutboundConnections : {93c3f784-9bac-464d-9ac3-662906f87ad1} > >> g> Name : DC1.abc.local > >> g> Partitions : {DC=abc,DC=local, > >> g> CN=Configuration,DC=abc,DC=local, > >> g> CN=Schema,CN=Configuration,DC=abc,DC=in > >> g> t, DC=DomainDnsZones,DC=abc,DC=local, > >> g> DC=ForestDnsZones,DC=abc,DC=local} > >> g> "Brandon Shell [MVP]" wrote: > >> g> > >> >> From the shell cut/paste this... what do you get? I am curious if > >> >> your having DCLocator problems. > >> >> > >> >> $context = new-object > >> >> System.DirectoryServices.ActiveDirectory.DirectoryContext("Domain","d > >> >> ns.domain.name") > >> >> > >> >> $dclist = > >> >> [System.DirectoryServices.ActiveDirectory.DomainController]::findall( > >> >> $context) > >> >> > >> >> $dclist > >> >> > >> >> Brandon Shell > >> >> --------------- > >> >> Blog: http://www.bsonposh.com/ > >> >> PSH Scripts Project: www.codeplex.com/psobject > >> >> g> Hi everyone, > >> >> g> I try to run as powershell script on an Exchange 2007 server. > >> >> g> Locally, it > >> >> g> works OK. Now I want to run it remotely : a VB .net program on a > >> >> g> workstation > >> >> g> creates a remote WMI process on the server that runs "cmd.exe /c > >> >> g> powershell.exe -PSConsoleFile path_to_exchange_consolefile > >> >> -command > >> >> g> my_script.ps1". > >> >> g> And now, each time I have to get something related to AD > >> >> g> (get-mailbox, or > >> >> g> get-adsite, for instance), I get this error : > >> >> g> An Active directory error 0x80072020 occurred when looking for > >> >> domain > >> >> g> controllers in domain cbas.int: An operations error occurred. > >> >> g> Nothing useful on google. > >> >> g> Can anybody help ? > >> > >> > >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Re: Scripted removal of domain controllers from AD? | PowerShell | |||
| Scripted removal of domain controllers from AD? | PowerShell | |||
| How to list offline Domain Controllers | PowerShell | |||
| domain controllers - up / down | PowerShell | |||
| Domain Controllers | Vista account administration | |||