Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine domain in a startup script

Status
Not open for further replies.

bhunji

Technical User
Feb 19, 2003
65
CA
Hi,

Is there a way to determine, from a command line, if a machine is plugged into our local domain using a network cable versus being plugged into a Home or Hotels network with a network cable?

I was going to have it do a ping on one of our servers but, every now and then the ICMP protocol is blocked at the routers so, pinging becomes useless...

Is there something else I could check for during system startup?
 
Don't understand the question.

You want to know which physical network the machine is connected to? Is the machine set to use DHCP? Is the machine logging on to the domain?

If the machine is a member of the domain, and attempting to log on to the domain, then presumably whether it succeeds or fails will tell you whether its connected or not to the domain network.

Other than that (ie, not logging on to doamin, or not a member of domain) - could try a net use command to a domain resource - and check whether its succeeded or failed.

What's the reason for need to do this?
 
You want to know which physical network the machine is connected to?"

Yes

"Is the machine set to use DHCP?"

Again Yes.

"Is the machine logging on to the domain?"

The machines and users are all members of the domain, but users are able to log in using cached credentials,

"What's the reason for need to do this?"

I'm trying to find a way to keep our laptops up to date with patches. So I want to determine if it has been on our network in the last month or two. and if it hasn't I'll force the laptop to shut down after displaying a message that they should bring it in to receive updates.
 
Obvious - disable cached logons? Its a policy setting I think. But I suspect your users would object to this. My suggestion of trying to access a network resource is still reaonable (ie, whenever you can, you write a marker file with date you did, then if you can't you check today's date against that).

However, must admit whole scheme sounds way over the the top to me - why not just ask laptop users to bring their machines in for updating whenever they're in the office? The odd patch isn't lilely to cause a problem (especially if you have other security stuff in place - like AV, anti-spyware and a firewall).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top