How to enable multiply domainjoin depending on default gateway?

Ok so in the environment im working in right now, the SCCM site is working towards two different domains, lets call them “Domain A” & “Domain B”. I would like my Task Sequence to join the computers it the right domain depending on what default gateway they have on the network.

I have tried the following, but im afraid neither works:
Select * from Win32_NetworkAdapterConfiguration where DefaultIPGateway=’x.x.x.x’

This will not work because the adapters are stored in an array.

I also found a way to do this use this query:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394162(v=vs.85).aspx
Select * FROM Win32_IP4RouteTable
WHERE Destination=’0.0.0.0′ AND NextHop=’x.x.x.x’

This queries the routing table, no details about the adapter need to be known. It work’s great just in general and in query’s but it will not work in a Task Sequence.

Looks like i have to install MDT. Thank you for all your answers.

//Karl Wirén

http://social.technet.microsoft.com/Forums/en-US/configmanagerosd/thread/0c7496dc-5543-489f-ac97-9ed20684d0b3/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s