|
|
Browse by Tags
All Tags » networking » Scripting Guy! (RSS)
-
Hey, Scripting Guy! I know I can use the DNS WMI provider and query a DNS server. But what if I am not using a Microsoft DNS server? Or what if I do not have admin rights on the DNS server? What happens then? I really do not want to resort to parsing the output from NSLookup. Can you hook me up? - BP Hi BP, You know, "Hook Me Up" was the second album by that Australian band, The Veronicas. It is actually pretty good. They're not the Spice Girls, but then who is? Anyway, the problem with parsing NSLookup
-
Hey, Scripting Guy! I need to create several new zones in DNS, and I do not want to waste time working through the GUI wizard. I mean, real network administrators do not use wizards. In the old days, this was easy: I’d just edit a .dns file and I’d be done. But with Active Directory integrated stuff, I cannot figure out where the things are stored, how they are created, or anything. Do I really have to use that silly wizard? - MT Hi MT, Wizards are great for people who are unsure of the different
-
Hey, Scripting Guy! We are adding some new Exchange Servers to our messaging infrastructure, and I want to create some new MX (Mail Exchanger) records in DNS. I do not want to to create these records manually because carpal tunnel is not my friend and manual creation tends to introduce errors. I like having a text file that shows exactly what was created. Is this something that can be scripted? - CI Hi CI, Ding! Tea time. Be back in 15. Ah, sweet relief: Some gun powder green tea I brought back from
-
Hey, Scripting Guy! We are having name resolution issues at work. It is so bad that when my wife calls me, the guy in the other cube gets the call. This manifests itself in concrete ways as well. Opening Office Outlook seems to take forever; going to internal Web sites takes a long time; trying to connect to an Office SharePoint site is about impossible. To make matters worse, the pointy headed boss (PHB) just spent a small fortune on buying new switches. The project was supposed to "make the network
-
Hey, Scripting Guy! How can I place the current date and time at the beginning of each line of Ping.exe output? -- AL Hey, AL. We have to admit, we were a little shocked by your question. Change the output of the Ping command? Really, AL. Would you ask us to rewrite Romeo and Juliet , giving it a more happy and upbeat ending? Would you ask us to fix up the Mona Lisa , giving Mona blonde hair and maybe a cute little butterfly tattoo? Would you ask us to take the peanuts out of peanut M&M’s and
-
Hey, Scripting Guy! How can I prevent a computer from using the LMHosts file? -- MJ Hey, MJ. You know, this was an interesting one, at least for the Scripting Guys. Not because the script was hard to write; that was actually pretty easy. What was hard - at least for us - was to find the LMHosts setting in the Windows GUI; that’s something we needed to do so we could verify that the script actually worked. After stumbling around a bit (which isn’t too unusual for the Scripting Guys) we eventually
-
Hey, Scripting Guy! How can I display the IP addresses associated with a given MAC address? -- NK Hey, NK. Before we answer your question we should take a moment to answer a related question. People often ask us, “If I have a MAC address can I write a script that will tell me which computer on my network is using that address?” Unfortunately, the answer to that question is this: no, you can’t write a script that somehow searches the network looking for a particular MAC address. The best you can do
-
Hey, Scripting Guy! How can I determine the local area connection that’s associated with a particular IP address? -- SH Hey, SH. Believe it or not, this is a fairly complicated procedure, and for two reasons. To begin with, we have to use two separate WMI classes - Win32_NetworkAdapter and Win32_NetworkAdapterConfiguration - in order to retrieve the information we need. That’s because network connection information is stored in one class (Win32_NetworkAdapter) and IP addresses are stored in another
-
Hey, Scripting Guy! How can I rename a local area connection? -- AP Hey, AP. You know, you hurt our feelings here: we Microsoft types spent a lot of time coming up with clever and catchy names like Local Area Connection, Local Area Connection 2, and Local Area Connection 3. And now you say you want to change those names? That hurts. But you know what they say: the customer is always right. Give us a minute to dry our tears and then we’ll show you a script that changes the name of Local Area Connection
-
Hey, Scripting Guy! How can I configure a computer to use a dynamically-assigned DNS Server? -- JB Hey, JB. Ah, this question brings back memories. A couple years ago the Scripting Guys were faced with this same problem, and discovered the answer entirely by accident; in fact, if Greg was able to type a line of code without making a mistake the truth might never have been known. Thanks to Greg’s bumbling, however, we have an answer for you. If you aren’t sure what we’re talking about take a look
-
Hey, Scripting Guy! I have a script that pings a computer before it tries to connect to it. The script works fine on Windows XP, but doesn’t work at all on my Windows 2000 computers. Do you have any idea why? -- AK Hey, AK. As a matter of fact, we do have an idea why. Here’s a simplified version of your script, which pings the computer with the IP address 192.168.1.1: strComputer = "192.168.1.1" Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery _ ("Select
|
|
|