Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


August 2008

Letters


RSS
Subscribe to Windows IT Pro | See More Windows OSs Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

PowerShell and Property Value
In “PowerShell 101, Lesson 3” (April 2008, InstantDoc ID 98177), the command

get-process |
  where {($_.handles -gt 100) `
  -and -not ($_.company -eq `
  “Microsoft Corporation”)}
is supposed to return all non-Microsoft processes. But three of the listed process names (i.e., CSRSS, SYSTEM, and WINLOGON) look a little out of place. When I use PowerShell to query them for their Company property value, all three return nothing. Microsoft obtained the CSRSS process from Citrix a few years ago, so the recoding is most likely an oversight. But I’m still wondering about the SYSTEM and WINLOGON processes.

—Mike Piontkowski

You bring up an important concern. You’re getting these results because the Company property value is null for those processes. (PowerShell is indifferent to ownership history and cares only about the property value itself!) You can write your code to take this fact into account, as in:

get-process |
  where {($_.handles -gt 100) `
  -and -not ($_.company -eq `
  “Microsoft Corporation” -or `
  $_.company -eq $null)}
Now, only processes whose Company value isn’t Microsoft Corporation (or isn’t null) are returned.

The problem with this approach is that it assumes that only Microsoft uses null for the company name, so you must determine how you want to handle such situations. Whenever you’re using properties to create these Boolean expressions, be aware of the possible values for those properties. Write your expressions accordingly, and take into account the possibility of null values.

—Robert Sheldon

DNS Wisdom
I read the IT Pro Hero story, “Tried-and-True DNS Wisdom” by Caroline Marwitz (April 2008, InstantDoc ID 98330). In the sidebar, “A Sysadmin’s DNS Best Practices,” Apostolos Fotakelis writes, “Get rid of NetBIOS over TCP and WINS.” Every time I’ve ever attempted to do that, I’ve lost mapped drives and have been unable to connect to any servers. What am I doing wrong? Also, if I disable NetBIOS over TCP from the Local Area Connection window, will it affect my WatchGuard VPN?

—Tony Sergi

Actually, in my article, I was referring to disabling NetBIOS over TCP via the Local Area Connection window. Disabling NetBIOS from Device Manager is a more drastic, problematic procedure that requires a reboot. Unfortunately, I have no experience with the WatchGuard VPN. However, disabling NetBIOS over TCP shouldn’t have any side effects on firewalls or VPN connections. That being said, you should always be aware of potential consequences. (See the article “How can I configure TCP/IP networking while NetBIOS is disabled in Windows 2000/XP/2003?” at www.petri.co.il/disable_netbios_in_w2k_xp_2003.htm for more information.) And, of course, be sure to test the change before effecting it in your environment.

—Apostolos Fotakelis

PC vs. Mac
I loved Mark Minasi’s Web-exclusive “No XP? Say It Ain’t So, Ray!” (www.windowsitpro.com, InstantDoc ID 99284). I, too, am a big fan of XP, and I haven’t found Microsoft Vista all that interesting. I did make the choice Mark talks about. When it was time to replace my Dell laptop (which was happily running XP), I went for a shiny MacBook Pro running Tiger (now Leopard). I have to say, I like my new computer so much that I plan to replace my five-year-old HP desktop system (happily running XP) with a new iMac running— yep—Leopard! And courtesy of VMware Fusion, I’ll pull the HP system’s XP installation so that I can still run XP in its own little virtual machine (VM) on the iMac. XP is a beautiful thing, and forcing people to upgrade will only help Microsoft’s competitors!

—Dan York

Server Core Commando
I just read Mark Minasi’s Windows Power Tools column, “Go Commando with Windows Server 2008’s Server Core” (June 2008, InstantDoc ID 98715). At the end of the article, Mark states that the only option for adding the DNS suffix from the command line is to modify the registry. However, you can also use the Windows Management Instrumentation Command Line (WMIC). First, find the adapter you want:

wmic nicconfig list
Next, add the DNS suffix. If the adapter’s index is 1, you’d type something like
wmic nicconfig 1 call setdnsdomain
  bigfirm.com
You can even perform this procedure remotely, as follows:
wmic /node:Server1 nicconfig 1 call
  setdnsdomain bigfirm.com
When Server Core gets PowerShell support, you’ll be able to use
Get-WmiObject Win32_NetworkAdapter
  Configuration -ComputerName
  Server1 |Where-Object{$_.IPEnabled -eq “TRUE”}
The object returned by this statement (System.Management.ManagementObject) supports the SetDNSDomain method.

—Aleksandar Nikolic

End of Article



Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...

Microsoft Delivers Service Pack 2 Beta 2 for Vista, Server 2008

Microsoft on Tuesday announced the availability of the Beta 2 version of Service Pack 2 (SP2) for Windows Vista and Windows Server 2008. Since both operating systems were developed from the same code base, they have a common servicing structure and thus ...

Windows Live Wave 3 Services Launch Begins

Late Tuesday, Microsoft began rolling out the services portion of its Windows Live Wave 3 launch. The company is shipping an unprecedented number of new and improved services that build off the success of Hotmail and Windows Live Messenger and attempt ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing