| Author | Messages | |
milburnr
Posts:0
 | | 03/02/2006 5:34 AM |
| Sorry
for the OT, but there are a lot of people here with extensive outside skills
and this might be a tricky thing to do (but I don™t want to post it on
forumz.hackz.tw)¦
I
have 2 computers “ one with a default (from image) of 192.168.1.34 /
255.255.255.224, and one with 192.168.2.34, same netmask. So they are on
different subnets, but they are on the same hub/switch. They are both
running NetBEUI. I can net view \\oldcomputer and see the shares on
the old computer. Of course I cannot ping the old computer. I have
a _vbscript_ to grab the IP address of the old computer, thinking it will use
whatever transport it can to get to the old computer. Bzzzt. Thanks
for playing. Returns computer does not exist message when
it times out. So if I change the new computer™s IP to the same
subnet (say 192.168.2.35) then the script works beautifully. Well, a lot
of help that is. If I disable tcp/ip, then the script fails
immediately. So I think the call does not use NetBEUI, only TCP/IP.
Why? Who knows, should be layer 7 vs. layer (I forget “ 3? 4?) why
should _vbscript_/WMI care what transport is used? Does it try to do a
WINS/NetBIOS lookup of the computer name and fail b/c there™s no TCP/IP?
So
surely there is a way to put to computers on the same wire, do a broadcast or
something to grab that computer™s IP. If I know the IP, I can
reconfigure the local machine, no worries. I could ask the manager to put
in the old computer™s IP address¦ but we can™t depend upon
them to tell us if the old case is black or white, apparently, so we don™t
even want to go there with ipconfig, type it in, verify, ask again, call help
desk, etc. We™re trying to save $1000 a pop.
So does
anyone know how to:
·
use a command line tool to return
the IP of another computer via broadcast or something
·
make WMI use NetBEUI if you know
the computer name?
·
any other ideas?
Here is
the script I™m using¦ I haven™t polished it, but it works on
the same subnet¦ (watch for line wrap)
On
Error Resume Next
strComputer
= InputBox("Please enter the old computer name")
Set
objWMIService =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
strComputer & "\root\CIMV2")
If
err.number 0 Then
Msgbox
"The computer name you entered was invalid. The error was:"
& vbNewline & err.Description
err.clear
End
If
Set
colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_NetworkAdapterConfiguration",,48)
For
Each objItem In colItems
strIPAddress = Join(objItem.IPAddress, ",")
strIPSubnet = Join(objItem.IPSubnet, ",")
strDefaultIPGateway = Join(objItem.DefaultIPGateway, ",")
If
strIPAddress "" Then
if
Left(CStr(strIPAddress),3) = Left(CStr(strDefaultIPGateway),3) Then strIP =
CStr(strIPAddress)
End
If
Next
msgbox
"My Address = " & strIPAddress & vbcrlf & "My
Netmask = " & strIPSubnet & vbcrlf & "My Gateway = "
& strDefaultIPGateway
Rich
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED /
CONFIDENTIAL INFORMATION may be contained in this message or any attachments.
This information is strictly confidential and may be subject to attorney-client
privilege. This message is intended only for the use of the named addressee. If
you are not the intended recipient of this message, unauthorized forwarding,
printing, copying, distribution, or using such information is strictly
prohibited and may be unlawful. If you have received this in error, you should
kindly notify the sender by reply e-mail and immediately destroy this message.
Unauthorized interception of this e-mail is a violation of federal criminal law.
Applebee's International, Inc. reserves the right to monitor and review the
content of all messages sent to and from this e-mail address. Messages sent to
or from this e-mail address may be stored on the Applebee's International, Inc.
e-mail system. | | | |
| bdesmond
Posts:416
 | | 03/02/2006 6:04 AM |
| Do you know the MAC Address? You could a) do something like nmap the
subnet and it will cause an arp for each IP (take an ethereal trace) and then
you can figure it out. You could also do a reverse arp though I don™t
know a tool offhand.
Are they on different vlans? The problem is that your PC won™t try
to arp for something on a different subnet, but instead will send the request
to its default gateway which will arp for it. If you can contact it via \\computer, try arp “a on the machine your going
to \\computer from and you should see the MAC
and the layer 3 address you use to contact the other machine.
Thanks,
Brian Desmond
brian@xxxxxxxxxxxxxxxx
c -
312.731.3132
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On
Behalf Of Rich Milburn
Sent: Thursday, March 02, 2006
12:34 PM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: [ActiveDir] (OT) How to
find a computer on same segment but different ip subnet
Sorry
for the OT, but there are a lot of people here with extensive outside skills
and this might be a tricky thing to do (but I don™t want to post it on
forumz.hackz.tw)¦
I
have 2 computers “ one with a default (from image) of 192.168.1.34 /
255.255.255.224, and one with 192.168.2.34, same netmask. So they are on
different subnets, but they are on the same hub/switch. They are both
running NetBEUI. I can net view \\oldcomputer and see the shares on
the old computer. Of course I cannot ping the old computer. I have
a _vbscript_ to grab the IP address of the old computer, thinking it will use
whatever transport it can to get to the old computer. Bzzzt. Thanks
for playing. Returns computer does not exist message when
it times out. So if I change the new computer™s IP to the same
subnet (say 192.168.2.35) then the script works beautifully. Well, a lot
of help that is. If I disable tcp/ip, then the script fails
immediately. So I think the call does not use NetBEUI, only TCP/IP.
Why? Who knows, should be layer 7 vs. layer (I forget “ 3? 4?) why
should _vbscript_/WMI care what transport is used? Does it try to do a
WINS/NetBIOS lookup of the computer name and fail b/c there™s no TCP/IP?
So
surely there is a way to put to computers on the same wire, do a broadcast or
something to grab that computer™s IP. If I know the IP, I can
reconfigure the local machine, no worries. I could ask the manager to put
in the old computer™s IP address¦ but we can™t depend upon
them to tell us if the old case is black or white, apparently, so we don™t
even want to go there with ipconfig, type it in, verify, ask again, call help
desk, etc. We™re trying to save $1000 a pop.
So
does anyone know how to:
· use
a command line tool to return the IP of another computer via broadcast or
something
· make
WMI use NetBEUI if you know the computer name?
· any
other ideas?
Here
is the script I™m using¦ I haven™t polished it, but it works
on the same subnet¦ (watch for line wrap)
On
Error Resume Next
strComputer
= InputBox("Please enter the old computer name")
Set
objWMIService =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
strComputer & "\root\CIMV2")
If
err.number 0 Then
Msgbox "The computer name you entered was invalid. The error
was:" & vbNewline & err.Description
err.clear
End
If
Set
colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_NetworkAdapterConfiguration",,48)
For
Each objItem In colItems
strIPAddress = Join(objItem.IPAddress, ",")
strIPSubnet = Join(objItem.IPSubnet, ",")
strDefaultIPGateway = Join(objItem.DefaultIPGateway, ",")
If strIPAddress "" Then
if Left(CStr(strIPAddress),3) = Left(CStr(strDefaultIPGateway),3) Then strIP =
CStr(strIPAddress)
End If
Next
msgbox
"My Address = " & strIPAddress & vbcrlf & "My
Netmask = " & strIPSubnet & vbcrlf & "My Gateway = "
& strDefaultIPGateway
Rich
-------APPLEBEE'S
INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED /
CONFIDENTIAL INFORMATION may be contained in this message or any attachments.
This information is strictly confidential and may be subject to attorney-client
privilege. This message is intended only for the use of the named addressee. If
you are not the intended recipient of this message, unauthorized forwarding,
printing, copying, distribution, or using such information is strictly
prohibited and may be unlawful. If you have received this in error, you should
kindly notify the sender by reply e-mail and immediately destroy this message.
Unauthorized interception of this e-mail is a violation of federal criminal
law. Applebee's International, Inc. reserves the right to monitor and review
the content of all messages sent to and from this e-mail address. Messages sent
to or from this e-mail address may be stored on the Applebee's International,
Inc. e-mail system. | | | |
| deji
Posts:150
 | | 03/02/2006 6:07 AM |
| I know that it all made sense to you when you wrote all that. However, I am
very slow and still on my first cup of coffee. So, in slooooooow motion:
Is the "old computer" dead or alive? If dead, is it dead as in just turned
off, or dead as in re-imaged? why is it important that you know its IP addy?
By that, I mean what's the stated end-goal here?
Sincerely,
Dèjì Akómöláfé, MCSE+M MCSA+M MCT
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon
________________________________
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx on behalf of Rich Milburn
Sent: Thu 3/2/2006 9:33 AM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: [ActiveDir] (OT) How to find a computer on same segment but
different ip subnet
Sorry for the OT, but there are a lot of people here with extensive outside
skills and this might be a tricky thing to do (but I don't want to post it on
forumz.hackz.tw)...
I have 2 computers - one with a default (from image) of 192.168.1.34 /
255.255.255.224, and one with 192.168.2.34, same netmask. So they are on
different subnets, but they are on the same hub/switch. They are both
running NetBEUI. I can net view \\oldcomputer and see the shares on the old
computer. Of course I cannot ping the old computer. I have a vbscript to
grab the IP address of the old computer, thinking it will use whatever
transport it can to get to the old computer. Bzzzt. Thanks for playing.
Returns "computer does not exist" message when it times out. So if I change
the new computer's IP to the same subnet (say 192.168.2.35) then the script
works beautifully. Well, a lot of help that is. If I disable tcp/ip, then
the script fails immediately. So I think the call does not use NetBEUI, only
TCP/IP. Why? Who knows, should be layer 7 vs. layer (I forget - 3? 4?) why
should vbscript/WMI care what transport is used? Does it try to do a
WINS/NetBIOS lookup of the computer name and fail b/c there's no TCP/IP?
So surely there is a way to put to computers on the same wire, do a broadcast
or something to grab that computer's IP. If I know the IP, I can reconfigure
the local machine, no worries. I could ask the manager to put in the old
computer's IP address... but we can't depend upon them to tell us if the old
case is black or white, apparently, so we don't even want to go there with
ipconfig, type it in, verify, ask again, call help desk, etc. We're trying
to save $1000 a pop.
So does anyone know how to:
* use a command line tool to return the IP of another computer via
broadcast or something
* make WMI use NetBEUI if you know the computer name?
* any other ideas?
Here is the script I'm using... I haven't polished it, but it works on the
same subnet... (watch for line wrap)
On Error Resume Next
strComputer = InputBox("Please enter the old computer name")
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
& strComputer & "\root\CIMV2")
If err.number 0 Then
Msgbox "The computer name you entered was invalid. The error
was:" & vbNewline & err.Description
err.clear
End If
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_NetworkAdapterConfiguration",,48)
For Each objItem In colItems
strIPAddress = Join(objItem.IPAddress, ",")
strIPSubnet = Join(objItem.IPSubnet, ",")
strDefaultIPGateway = Join(objItem.DefaultIPGateway, ",")
If strIPAddress "" Then
if Left(CStr(strIPAddress),3) =
Left(CStr(strDefaultIPGateway),3) Then strIP = CStr(strIPAddress)
End If
Next
msgbox "My Address = " & strIPAddress & vbcrlf & "My Netmask = " &
strIPSubnet & vbcrlf & "My Gateway = " & strDefaultIPGateway
Rich
________________________________
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED / CONFIDENTIAL INFORMATION may be contained in this
message or any attachments. This information is strictly confidential and may
be subject to attorney-client privilege. This message is intended only for
the use of the named addressee. If you are not the intended recipient of this
message, unauthorized forwarding, printing, copying, distribution, or using
such information is strictly prohibited and may be unlawful. If you have
received this in error, you should kindly notify the sender by reply e-mail
and immediately destroy this message. Unauthorized interception of this
e-mail is a violation of federal criminal law. Applebee's International, Inc.
reserves the right to monitor and review the content of all messages sent to
and from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Applebee's International, Inc. e-mail system.
________________________________ List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ | | | |
| mkline
Posts:20
 | | 03/02/2006 6:18 AM |
| | Message body was not found. | | | |
| milburnr
Posts:0
 | | 03/02/2006 7:15 AM |
| Thanks Mike, I™ll give that a try¦
-----------------------------------------------------------------------
Rich Milburn
MCSE, Microsoft MVP -
Directory Services
Sr Network Analyst, Field Platform Development
Applebee's International, Inc.
4551 W. 107th St
Overland Park, KS 66207
913-967-2819
----------------------------------------------------------------------
I love the smell of
red herrings in the morning - anonymous
From:
ActiveDir-owner@xxxxxxxxxxxxxxxxxx [mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of mike kline
Sent: Thursday, March 02, 2006
12:18 PM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: Re: [ActiveDir] (OT) How
to find a computer on same segment but different ip subnet
You may be able to use PsExec to retrive the info you are looking for
http://www.sysinternals.com/Utilities/PsExec.html
psexec \\machine ipconfig
You can use the IP address or the name of the box for machine.
Thanks
Mike
On 3/2/06, deji@xxxxxxxxxxxxxx deji@xxxxxxxxxxxxxx> wrote: I know that it all made sense to you when you wrote all that. However,
I am
very slow and still on my first cup of coffee. So, in slooooooow motion:
Is the "old computer" dead or alive? If dead, is it dead as in just
turned
off, or dead as in re-imaged? why is it important that you know its IP addy?
By that, I mean what's the stated end-goal here? Sincerely,
Dèjì Akómöláfé, MCSE+M MCSA+M MCT
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon
________________________________
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
on behalf of Rich Milburn
Sent: Thu 3/2/2006 9:33 AM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: [ActiveDir] (OT) How to find a computer on same segment but
different ip subnet
Sorry for the OT, but there are a lot of people here with extensive outside
skills and this might be a tricky thing to do (but I don't want to post it on
forumz.hackz.tw)...
I have 2 computers - one with a default (from image) of 192.168.1.34 /
255.255.255.224, and one with 192.168.2.34, same netmask. So they
are on
different subnets, but they are on the same hub/switch. They are
both
running NetBEUI. I can net view \\oldcomputer and see the
shares on the old
computer. Of course I cannot ping the old computer. I
have a _vbscript_ to
grab the IP address of the old computer, thinking it will use whatever
transport it can to get to the old
computer. Bzzzt. Thanks for playing.
Returns "computer does not exist" message when it times
out. So if I change
the new computer's IP to the same subnet (say 192.168.2.35)
then the script
works beautifully. Well, a lot of help that is. If I
disable tcp/ip, then
the script fails immediately. So I think the call does not use
NetBEUI, only
TCP/IP. Why? Who knows, should be layer 7 vs. layer (I
forget - 3? 4?) why
should _vbscript_/WMI care what transport is used? Does it try to do a
WINS/NetBIOS lookup of the computer name and fail b/c there's no TCP/IP?
So surely there is a way to put to computers on the same wire, do a broadcast
or something to grab that computer's IP. If I know the IP, I can
reconfigure
the local machine, no worries. I could ask the manager to put in the
old
computer's IP address... but we can't depend upon them to tell us if the old
case is black or white, apparently, so we don't even want to go there with
ipconfig, type it in, verify, ask again, call help desk, etc. We're
trying
to save $1000 a pop.
So does anyone know how to:
* use a command line tool to
return the IP of another computer via
broadcast or something
* make WMI use NetBEUI if you
know the computer name?
* any other ideas?
Here is the script I'm using... I haven't polished it, but it works on the
same subnet... (watch for line wrap)
On Error Resume Next
strComputer = InputBox("Please enter the old computer name")
Set objWMIService =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
& strComputer & "\root\CIMV2")
If err.number 0 Then
Msgbox "The
computer name you entered was invalid. The error
was:" & vbNewline & err.Description
err.clear
End If
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_NetworkAdapterConfiguration",,48)
For Each objItem In colItems
strIPAddress = Join(objItem.IPAddress, ",")
strIPSubnet = Join(objItem.IPSubnet, ",")
strDefaultIPGateway = Join(objItem.DefaultIPGateway,
",")
If strIPAddress
"" Then
if Left(CStr(strIPAddress),3) =
Left(CStr(strDefaultIPGateway),3) Then strIP = CStr(strIPAddress)
End If
Next
msgbox "My Address = " & strIPAddress & vbcrlf & "My
Netmask = " &
strIPSubnet & vbcrlf & "My Gateway = " &
strDefaultIPGateway
Rich ________________________________
-------APPLEBEE'S INTERNATIONAL, INC.
CONFIDENTIALITY NOTICE-------
PRIVILEGED / CONFIDENTIAL INFORMATION may
be contained in this
message or any attachments. This information is strictly confidential and may
be subject to attorney-client privilege. This message is intended only for
the use of the named addressee. If you are not the intended recipient of this
message, unauthorized forwarding, printing, copying, distribution, or using
such information is strictly prohibited and may be unlawful. If you have
received this in error, you should kindly notify the sender by reply e-mail
and immediately destroy this message. Unauthorized interception of this
e-mail is a violation of federal criminal law. Applebee's International, Inc.
reserves the right to monitor and review the content of all messages sent to
and from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Applebee's International, Inc. e-mail system.
________________________________ List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED /
CONFIDENTIAL INFORMATION may be contained in this message or any attachments.
This information is strictly confidential and may be subject to attorney-client
privilege. This message is intended only for the use of the named addressee. If
you are not the intended recipient of this message, unauthorized forwarding,
printing, copying, distribution, or using such information is strictly
prohibited and may be unlawful. If you have received this in error, you should
kindly notify the sender by reply e-mail and immediately destroy this message.
Unauthorized interception of this e-mail is a violation of federal criminal law.
Applebee's International, Inc. reserves the right to monitor and review the
content of all messages sent to and from this e-mail address. Messages sent to
or from this e-mail address may be stored on the Applebee's International, Inc.
e-mail system. | | | |
| milburnr
Posts:0
 | | 03/02/2006 7:52 AM |
| Hey Deji...
Old computer is alive. It is NT4. The new computer has been installed with an image of XP, and it is replacing the old computer. we'll bring the new one up, grab data and config info from the old one, power the old one down, reconfig the new one to match the old one, and we're done. Not bad to script, except for this one thing. I'm gonna try the psexec tool, that might work. ... in fact, it does work. Gotta send the results to a file I guess, but that's ok... I have that technology :)
If anyone else knows how to tell WMI to use netbeui though, or why it won't, or has other ideas, feel free to share (even offline if you wish)
Thanks
Rich
-----------------------------------------------------------------------
Rich Milburn
MCSE, Microsoft MVP - Directory Services
Sr Network Analyst, Field Platform Development
Applebee's International, Inc.
4551 W. 107th St
Overland Park, KS 66207
913-967-2819
----------------------------------------------------------------------
"I love the smell of red herrings in the morning" - anonymous
-----Original Message-----
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx [mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of deji@xxxxxxxxxxxxxx
Sent: Thursday, March 02, 2006 12:03 PM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: RE: [ActiveDir] (OT) How to find a computer on same segment but different ip subnet
I know that it all made sense to you when you wrote all that. However, I am
very slow and still on my first cup of coffee. So, in slooooooow motion:
Is the "old computer" dead or alive? If dead, is it dead as in just turned
off, or dead as in re-imaged? why is it important that you know its IP addy?
By that, I mean what's the stated end-goal here?
Sincerely,
Dèjì Akómöláfé, MCSE+M MCSA+M MCT
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon
________________________________
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx on behalf of Rich Milburn
Sent: Thu 3/2/2006 9:33 AM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: [ActiveDir] (OT) How to find a computer on same segment but
different ip subnet
Sorry for the OT, but there are a lot of people here with extensive outside
skills and this might be a tricky thing to do (but I don't want to post it on
forumz.hackz.tw)...
I have 2 computers - one with a default (from image) of 192.168.1.34 /
255.255.255.224, and one with 192.168.2.34, same netmask. So they are on
different subnets, but they are on the same hub/switch. They are both
running NetBEUI. I can net view \\oldcomputer and see the shares on the old
computer. Of course I cannot ping the old computer. I have a vbscript to
grab the IP address of the old computer, thinking it will use whatever
transport it can to get to the old computer. Bzzzt. Thanks for playing.
Returns "computer does not exist" message when it times out. So if I change
the new computer's IP to the same subnet (say 192.168.2.35) then the script
works beautifully. Well, a lot of help that is. If I disable tcp/ip, then
the script fails immediately. So I think the call does not use NetBEUI, only
TCP/IP. Why? Who knows, should be layer 7 vs. layer (I forget - 3? 4?) why
should vbscript/WMI care what transport is used? Does it try to do a
WINS/NetBIOS lookup of the computer name and fail b/c there's no TCP/IP?
So surely there is a way to put to computers on the same wire, do a broadcast
or something to grab that computer's IP. If I know the IP, I can reconfigure
the local machine, no worries. I could ask the manager to put in the old
computer's IP address... but we can't depend upon them to tell us if the old
case is black or white, apparently, so we don't even want to go there with
ipconfig, type it in, verify, ask again, call help desk, etc. We're trying
to save $1000 a pop.
So does anyone know how to:
* use a command line tool to return the IP of another computer via
broadcast or something
* make WMI use NetBEUI if you know the computer name?
* any other ideas?
Here is the script I'm using... I haven't polished it, but it works on the
same subnet... (watch for line wrap)
On Error Resume Next
strComputer = InputBox("Please enter the old computer name")
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
& strComputer & "\root\CIMV2")
If err.number 0 Then
Msgbox "The computer name you entered was invalid. The error
was:" & vbNewline & err.Description
err.clear
End If
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_NetworkAdapterConfiguration",,48)
For Each objItem In colItems
strIPAddress = Join(objItem.IPAddress, ",")
strIPSubnet = Join(objItem.IPSubnet, ",")
strDefaultIPGateway = Join(objItem.DefaultIPGateway, ",")
If strIPAddress "" Then
if Left(CStr(strIPAddress),3) =
Left(CStr(strDefaultIPGateway),3) Then strIP = CStr(strIPAddress)
End If
Next
msgbox "My Address = " & strIPAddress & vbcrlf & "My Netmask = " &
strIPSubnet & vbcrlf & "My Gateway = " & strDefaultIPGateway
Rich
________________________________
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED / CONFIDENTIAL INFORMATION may be contained in this
message or any attachments. This information is strictly confidential and may
be subject to attorney-client privilege. This message is intended only for
the use of the named addressee. If you are not the intended recipient of this
message, unauthorized forwarding, printing, copying, distribution, or using
such information is strictly prohibited and may be unlawful. If you have
received this in error, you should kindly notify the sender by reply e-mail
and immediately destroy this message. Unauthorized interception of this
e-mail is a violation of federal criminal law. Applebee's International, Inc.
reserves the right to monitor and review the content of all messages sent to
and from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Applebee's International, Inc. e-mail system.
________________________________ List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE------- PRIVILEGED /
CONFIDENTIAL INFORMATION may be contained in this message or any attachments.
This information is strictly confidential and may be subject to attorney-client
privilege. This message is intended only for the use of the named addressee. If
you are not the intended recipient of this message, unauthorized forwarding,
printing, copying, distribution, or using such information is strictly
prohibited and may be unlawful. If you have received this in error, you should
kindly notify the sender by reply e-mail and immediately destroy this message.
Unauthorized interception of this e-mail is a violation of federal criminal law.
Applebee's International, Inc. reserves the right to monitor and review the
content of all messages sent to and from this e-mail address. Messages sent to
or from this e-mail address may be stored on the Applebee's International, Inc.
e-mail system.
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ | | | |
| deji
Posts:150
 | | 03/02/2006 8:28 AM |
| Back at you.....
It appears that the problem is due to your NT4 not speaking WMI. In such
situations, I either rewrite the vbscript to query the registry using reg.exe
and grab the info, or I script an auto-deployment of WMI to the
non-WMI-compliant systems using
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=AFE41
F46-E213-4CBF-9C5B-FBF236E0E875
The psexec option is not bad either, considering that you can put all the
"old names" in question into one input file and feed it to psexec at once.
Sincerely,
Dèjì Akómöláfé, MCSE+M MCSA+M MCT
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon
________________________________
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx on behalf of Rich Milburn
Sent: Thu 3/2/2006 11:53 AM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: RE: [ActiveDir] (OT) How to find a computer on same segment but
different ip subnet
Hey Deji...
Old computer is alive. It is NT4. The new computer has been installed with
an image of XP, and it is replacing the old computer. we'll bring the new
one up, grab data and config info from the old one, power the old one down,
reconfig the new one to match the old one, and we're done. Not bad to
script, except for this one thing. I'm gonna try the psexec tool, that might
work. ... in fact, it does work. Gotta send the results to a file I guess,
but that's ok... I have that technology :)
If anyone else knows how to tell WMI to use netbeui though, or why it won't,
or has other ideas, feel free to share (even offline if you wish)
Thanks
Rich
-----------------------------------------------------------------------
Rich Milburn
MCSE, Microsoft MVP - Directory Services
Sr Network Analyst, Field Platform Development
Applebee's International, Inc.
4551 W. 107th St
Overland Park, KS 66207
913-967-2819
----------------------------------------------------------------------
"I love the smell of red herrings in the morning" - anonymous
-----Original Message-----
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of deji@xxxxxxxxxxxxxx
Sent: Thursday, March 02, 2006 12:03 PM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: RE: [ActiveDir] (OT) How to find a computer on same segment but
different ip subnet
I know that it all made sense to you when you wrote all that. However, I am
very slow and still on my first cup of coffee. So, in slooooooow motion:
Is the "old computer" dead or alive? If dead, is it dead as in just turned
off, or dead as in re-imaged? why is it important that you know its IP addy?
By that, I mean what's the stated end-goal here? Sincerely,
Dèjì Akómöláfé, MCSE+M MCSA+M MCT
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon
________________________________
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx on behalf of Rich Milburn
Sent: Thu 3/2/2006 9:33 AM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: [ActiveDir] (OT) How to find a computer on same segment but
different ip subnet
Sorry for the OT, but there are a lot of people here with extensive outside
skills and this might be a tricky thing to do (but I don't want to post it on
forumz.hackz.tw)...
I have 2 computers - one with a default (from image) of 192.168.1.34 /
255.255.255.224, and one with 192.168.2.34, same netmask. So they are on
different subnets, but they are on the same hub/switch. They are both
running NetBEUI. I can net view \\oldcomputer and see the shares on the old
computer. Of course I cannot ping the old computer. I have a vbscript to
grab the IP address of the old computer, thinking it will use whatever
transport it can to get to the old computer. Bzzzt. Thanks for playing.
Returns "computer does not exist" message when it times out. So if I change
the new computer's IP to the same subnet (say 192.168.2.35) then the script
works beautifully. Well, a lot of help that is. If I disable tcp/ip, then
the script fails immediately. So I think the call does not use NetBEUI, only
TCP/IP. Why? Who knows, should be layer 7 vs. layer (I forget - 3? 4?) why
should vbscript/WMI care what transport is used? Does it try to do a
WINS/NetBIOS lookup of the computer name and fail b/c there's no TCP/IP?
So surely there is a way to put to computers on the same wire, do a broadcast
or something to grab that computer's IP. If I know the IP, I can reconfigure
the local machine, no worries. I could ask the manager to put in the old
computer's IP address... but we can't depend upon them to tell us if the old
case is black or white, apparently, so we don't even want to go there with
ipconfig, type it in, verify, ask again, call help desk, etc. We're trying
to save $1000 a pop.
So does anyone know how to:
* use a command line tool to return the IP of another computer via
broadcast or something
* make WMI use NetBEUI if you know the computer name?
* any other ideas?
Here is the script I'm using... I haven't polished it, but it works on the
same subnet... (watch for line wrap)
On Error Resume Next
strComputer = InputBox("Please enter the old computer name")
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
& strComputer & "\root\CIMV2")
If err.number 0 Then
Msgbox "The computer name you entered was invalid. The error
was:" & vbNewline & err.Description
err.clear
End If
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_NetworkAdapterConfiguration",,48)
For Each objItem In colItems
strIPAddress = Join(objItem.IPAddress, ",")
strIPSubnet = Join(objItem.IPSubnet, ",")
strDefaultIPGateway = Join(objItem.DefaultIPGateway, ",")
If strIPAddress "" Then
if Left(CStr(strIPAddress),3) =
Left(CStr(strDefaultIPGateway),3) Then strIP = CStr(strIPAddress)
End If
Next
msgbox "My Address = " & strIPAddress & vbcrlf & "My Netmask = " &
strIPSubnet & vbcrlf & "My Gateway = " & strDefaultIPGateway
Rich
________________________________
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED / CONFIDENTIAL INFORMATION may be contained in this
message or any attachments. This information is strictly confidential and may
be subject to attorney-client privilege. This message is intended only for
the use of the named addressee. If you are not the intended recipient of this
message, unauthorized forwarding, printing, copying, distribution, or using
such information is strictly prohibited and may be unlawful. If you have
received this in error, you should kindly notify the sender by reply e-mail
and immediately destroy this message. Unauthorized interception of this
e-mail is a violation of federal criminal law. Applebee's International, Inc.
reserves the right to monitor and review the content of all messages sent to
and from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Applebee's International, Inc. e-mail system.
________________________________ List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED /
CONFIDENTIAL INFORMATION may be contained in this message or any attachments.
This information is strictly confidential and may be subject to
attorney-client
privilege. This message is intended only for the use of the named addressee.
If
you are not the intended recipient of this message, unauthorized forwarding,
printing, copying, distribution, or using such information is strictly
prohibited and may be unlawful. If you have received this in error, you
should
kindly notify the sender by reply e-mail and immediately destroy this
message.
Unauthorized interception of this e-mail is a violation of federal criminal
law.
Applebee's International, Inc. reserves the right to monitor and review the
content of all messages sent to and from this e-mail address. Messages sent
to
or from this e-mail address may be stored on the Applebee's International,
Inc.
e-mail system.
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ | | | |
| milburnr
Posts:0
 | | 03/08/2006 2:10 AM |
| Yeah that was a concern initially but we did install it. Actually I believe the issue is that (from docs I have found) WMI uses RPC which doesn't run over NetBEUI, it uses NetBIOS over TCP/IP.
I did manage to use psexec, and it seems to work most of the time. I got the detection part, and parsing the results from psconfig, now I'm working on the resetting of the IP locally to the same subnet. I'll figure that out, I have another script that does it well.
If anyone is interested in seeing this script when I'm done, say so and I'll post it.
Rich
-----------------------------------------------------------------------
Rich Milburn
MCSE, Microsoft MVP - Directory Services
Sr Network Analyst, Field Platform Development
Applebee's International, Inc.
4551 W. 107th St
Overland Park, KS 66207
913-967-2819
----------------------------------------------------------------------
"I love the smell of red herrings in the morning" - anonymous
-----Original Message-----
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx [mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of deji@xxxxxxxxxxxxxx
Sent: Thursday, March 02, 2006 2:27 PM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: RE: [ActiveDir] (OT) How to find a computer on same segment but different ip subnet
Back at you.....
It appears that the problem is due to your NT4 not speaking WMI. In such
situations, I either rewrite the vbscript to query the registry using reg.exe
and grab the info, or I script an auto-deployment of WMI to the
non-WMI-compliant systems using
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=AFE41
F46-E213-4CBF-9C5B-FBF236E0E875
The psexec option is not bad either, considering that you can put all the
"old names" in question into one input file and feed it to psexec at once.
Sincerely,
Dèjì Akómöláfé, MCSE+M MCSA+M MCT
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon
________________________________
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx on behalf of Rich Milburn
Sent: Thu 3/2/2006 11:53 AM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: RE: [ActiveDir] (OT) How to find a computer on same segment but
different ip subnet
Hey Deji...
Old computer is alive. It is NT4. The new computer has been installed with
an image of XP, and it is replacing the old computer. we'll bring the new
one up, grab data and config info from the old one, power the old one down,
reconfig the new one to match the old one, and we're done. Not bad to
script, except for this one thing. I'm gonna try the psexec tool, that might
work. ... in fact, it does work. Gotta send the results to a file I guess,
but that's ok... I have that technology :)
If anyone else knows how to tell WMI to use netbeui though, or why it won't,
or has other ideas, feel free to share (even offline if you wish)
Thanks
Rich
-----------------------------------------------------------------------
Rich Milburn
MCSE, Microsoft MVP - Directory Services
Sr Network Analyst, Field Platform Development
Applebee's International, Inc.
4551 W. 107th St
Overland Park, KS 66207
913-967-2819
----------------------------------------------------------------------
"I love the smell of red herrings in the morning" - anonymous
-----Original Message-----
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of deji@xxxxxxxxxxxxxx
Sent: Thursday, March 02, 2006 12:03 PM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: RE: [ActiveDir] (OT) How to find a computer on same segment but
different ip subnet
I know that it all made sense to you when you wrote all that. However, I am
very slow and still on my first cup of coffee. So, in slooooooow motion:
Is the "old computer" dead or alive? If dead, is it dead as in just turned
off, or dead as in re-imaged? why is it important that you know its IP addy?
By that, I mean what's the stated end-goal here? Sincerely,
Dèjì Akómöláfé, MCSE+M MCSA+M MCT
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon
________________________________
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx on behalf of Rich Milburn
Sent: Thu 3/2/2006 9:33 AM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: [ActiveDir] (OT) How to find a computer on same segment but
different ip subnet
Sorry for the OT, but there are a lot of people here with extensive outside
skills and this might be a tricky thing to do (but I don't want to post it on
forumz.hackz.tw)...
I have 2 computers - one with a default (from image) of 192.168.1.34 /
255.255.255.224, and one with 192.168.2.34, same netmask. So they are on
different subnets, but they are on the same hub/switch. They are both
running NetBEUI. I can net view \\oldcomputer and see the shares on the old
computer. Of course I cannot ping the old computer. I have a vbscript to
grab the IP address of the old computer, thinking it will use whatever
transport it can to get to the old computer. Bzzzt. Thanks for playing.
Returns "computer does not exist" message when it times out. So if I change
the new computer's IP to the same subnet (say 192.168.2.35) then the script
works beautifully. Well, a lot of help that is. If I disable tcp/ip, then
the script fails immediately. So I think the call does not use NetBEUI, only
TCP/IP. Why? Who knows, should be layer 7 vs. layer (I forget - 3? 4?) why
should vbscript/WMI care what transport is used? Does it try to do a
WINS/NetBIOS lookup of the computer name and fail b/c there's no TCP/IP?
So surely there is a way to put to computers on the same wire, do a broadcast
or something to grab that computer's IP. If I know the IP, I can reconfigure
the local machine, no worries. I could ask the manager to put in the old
computer's IP address... but we can't depend upon them to tell us if the old
case is black or white, apparently, so we don't even want to go there with
ipconfig, type it in, verify, ask again, call help desk, etc. We're trying
to save $1000 a pop.
So does anyone know how to:
* use a command line tool to return the IP of another computer via
broadcast or something
* make WMI use NetBEUI if you know the computer name?
* any other ideas?
Here is the script I'm using... I haven't polished it, but it works on the
same subnet... (watch for line wrap)
On Error Resume Next
strComputer = InputBox("Please enter the old computer name")
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
& strComputer & "\root\CIMV2")
If err.number 0 Then
Msgbox "The computer name you entered was invalid. The error
was:" & vbNewline & err.Description
err.clear
End If
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_NetworkAdapterConfiguration",,48)
For Each objItem In colItems
strIPAddress = Join(objItem.IPAddress, ",")
strIPSubnet = Join(objItem.IPSubnet, ",")
strDefaultIPGateway = Join(objItem.DefaultIPGateway, ",")
If strIPAddress "" Then
if Left(CStr(strIPAddress),3) =
Left(CStr(strDefaultIPGateway),3) Then strIP = CStr(strIPAddress)
End If
Next
msgbox "My Address = " & strIPAddress & vbcrlf & "My Netmask = " &
strIPSubnet & vbcrlf & "My Gateway = " & strDefaultIPGateway
Rich
________________________________
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED / CONFIDENTIAL INFORMATION may be contained in this
message or any attachments. This information is strictly confidential and may
be subject to attorney-client privilege. This message is intended only for
the use of the named addressee. If you are not the intended recipient of this
message, unauthorized forwarding, printing, copying, distribution, or using
such information is strictly prohibited and may be unlawful. If you have
received this in error, you should kindly notify the sender by reply e-mail
and immediately destroy this message. Unauthorized interception of this
e-mail is a violation of federal criminal law. Applebee's International, Inc.
reserves the right to monitor and review the content of all messages sent to
and from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Applebee's International, Inc. e-mail system.
________________________________ List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED /
CONFIDENTIAL INFORMATION may be contained in this message or any attachments.
This information is strictly confidential and may be subject to
attorney-client
privilege. This message is intended only for the use of the named addressee.
If
you are not the intended recipient of this message, unauthorized forwarding,
printing, copying, distribution, or using such information is strictly
prohibited and may be unlawful. If you have received this in error, you
should
kindly notify the sender by reply e-mail and immediately destroy this
message.
Unauthorized interception of this e-mail is a violation of federal criminal
law.
Applebee's International, Inc. reserves the right to monitor and review the
content of all messages sent to and from this e-mail address. Messages sent
to
or from this e-mail address may be stored on the Applebee's International,
Inc.
e-mail system.
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE------- PRIVILEGED /
CONFIDENTIAL INFORMATION may be contained in this message or any attachments.
This information is strictly confidential and may be subject to attorney-client
privilege. This message is intended only for the use of the named addressee. If
you are not the intended recipient of this message, unauthorized forwarding,
printing, copying, distribution, or using such information is strictly
prohibited and may be unlawful. If you have received this in error, you should
kindly notify the sender by reply e-mail and immediately destroy this message.
Unauthorized interception of this e-mail is a violation of federal criminal law.
Applebee's International, Inc. reserves the right to monitor and review the
content of all messages sent to and from this e-mail address. Messages sent to
or from this e-mail address may be stored on the Applebee's International, Inc.
e-mail system.
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ | | | |
|
|