Semi-regular web-link clearance – January 2010


Today I learned a little bit about how to get to some of the data stored within special shell folders.  You can get a list of all of the easy-to-get-to special folders here.  I noticed one folder in particular that a bunch of systems administrators I know want to read, and that’s the Nearby Computers page.  Here’s a quick 23-line function that will go and get all of the computers from the Nearby Computers page, ping them, and return the Win32_PingStatus objects.

End-to-End WAN Optimization with BranchCache

Expanding a business into new regions of the world with branch offices is a great idea from a business perspective, but it often presents challenges to network architects and implementers. To connect each branch office to a central location requires some sort of physical or logical connection, with bandwidth that is typically orders of magnitude smaller than local area connections. Low bandwidth combined with the trend toward centralizing organization data often yields branch office links that are congested, resulting in poor performance for applications. Moreover, many types of wide area network (WAN) links are expensive and can incur substantial startup and monthly costs.

Understanding DFSR conflict algorithms (and doing something about conflicts)

I’m frequently asked to explain the DFSR conflict algorithm – i.e. what happens when files are created or modified on two servers before replication takes place. What we don’t document well is that there are actually three conflict algorithms and they all behave quite differently. I am breaking these out into scenarios for easier understanding.

The Configuration Manager Service Pack Install Guide

This document was created to help in troubleshooting Configuration Manager Service Pack 2 (SP2) install failures. This document is not entirely specific to Service Pack 2 and can apply to Service Pack 1 installs, upgrades from SMS 2003 to SCCM, and future service pack or Configuration Manager versions that rely on .mof file compilations, SQL SPNS, provider DLLs, etc.

PowerScripting Podcast with Ed Wilson

Some troubleshooting resouces:

Bookmark and Share

The Windows PowerShell syntax was deliberately chosen

PowerShell logo The Windows PowerShell syntax was deliberately chosen to facilitate ease of use and ease of learning.  Corporate enterprise Windows administrators are the target audience.

– Windows PowerShell Scripting Guide by Ed Wilson, Microsoft Press.

I’m teaching myself PowerShell at the moment, because:

  1. it’s the future of Windows scripting.
  2. I had 1400+ computers I needed to check for a particular file, and it looked easier with PowerShell.

Future of Windows scripting.

Back in the dark ol’ days, if you needed a script created on DOS and Windows, your choices were DOS Batch, and DOS Batch.  This changed in 1991 with KiXtart.  KiXtart was created by a Microsoft employee, to provide corporate IT types with more robust logon scripting.

Like the 9 headed Hydra, KiXtart blossomed.  And got into places where it shouldn’t have gone.  I know of one 4000+ desktop company using it for software deployments.  Erkkkk!  Imagine how much spaghetti code there would have been in that.

Then VBscript.  VBscript was trumpeted by Microsoft in 1998 as the better/new way forward.  One Windows IT Pro writer said in 2001:

VBScript, one of the most powerful and underused features in the Windows environment, provides the same powerful programming tools (e.g., variable support, structured program control, the ability to leverage COM objects) that you’ll find in full-featured development languages.

It was that very powerfulness which caused some security problems with VBscript (mis)use.  So Microsoft threw the baby out with the bath water and created PowerShell to address those security issues.  Sure there are some other advantages to PowerShell, such as speed, and that it’s going to be how you script/interact with new Microsoft products.

Those 1400+ computers?

The script worked well.  Here is the cut down version:

$windows_PCs = (Get-Content c:\temp\pc-list.txt)
foreach ($computer in $windows_PCs)
$file_exist_path = "\\"+ $computer + "\c$\data\fred.txt"
$file_exist_OK = (Test-Path $file_exist_path)
if ($file_exist_OK)
write-host $computer has the fred file
write-host $computer is missing the fred file
#endif - PowerShell does not use EndIf statements, so I put this here as a boundary.
#next - PowerShell doesn't have a next statement either.

CATBERT has the fred file

Bookmark and Share