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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple computer name check

Status
Not open for further replies.

terry712

Technical User
Joined
Oct 1, 2002
Messages
2,175
Location
GB
i have a very basic script for a few odd pc's that have to do certain things - all this is fine except on one. i think the tecs have forgot to sid or have changed the name

is there a quick script that i can write so i can get someone remote to run so it actually says what the pc thinks it's called and see if it differs from the comp name in computer name

it's in the ad as the name in the script so it's not a typo

the script i'm doing to check is

strComputerName = wshNetwork.ComputerName
If InStr(strComputerName, "lapbasil") Then
blah blah blah

 
terry712,

What is the os? What do you know about its ipaddress? You need to know instead it's ipaddress to bind to it using wmi and get it's name from win32_operatingsystem class or others. Many classes expose computer name. Else, do it locally.

regards - tsuji
 
it's ok
found a script
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top