Whenever I am doing large sweeps of the network that require connecting to a large number of workstations (e.g. file copy, wmi query, etc.), I prefer to check to see if I can even see the system. This avoids waiting for (WMI) timeouts and also aids in troubleshooting failures. If the file copy failed, why? Well, if I can’t ping it or it can’t be resolved, I would like to know right away and move on to the next host.
In a recent incident, an Exchange server had a complete volume failure during testing. Exchange 2010 was reinstalled but when installing Service Pack 1, it failed upgrading the Mailbox Role. Upon reviewing the log, I found the following line:
Database is mandatory on UserMailbox. Property Name: Database The error doesn’t explain the problem very well but it is basically saying that there is a UserMailbox without a database, which should never happen. The failure of the volume and subsequent reinstall of 2010 left the arbitration mailboxes (and one or two user mailboxes) orphaned. Most of the suggestions to resolve this problem list doing things like deleting the system mailboxes and running “setup.com /PrepareAD”. After looking around, I was able to parse together a few other options and find a fix.
Twice in the past two weeks, I have come across Exchange 2003 to Exchange 2007 migrations which went uncompleted. In both cases, I received the following error(s) when trying to view the properties of a recipient with spaces in its alias or when viewing the properties of the offline address book:
The properties on have invalid data. If you click OK, default values will be used instead and will be saved if you do not change them before hitting Apply or OK on the property page. If you click cancel, the object will be displayed read-only and corrupted values will be retained. The following values have invalid data: Alias. WARNING: Object has been corrupted and it is in an inconsistent state. The following validation errors have been encountered: WARNING: is not valid for Alias. Set- : is not valid for Alias. Exchange 2003 would allow an administrator to put spaces in the Alias attribute. That poses a problem for 2007 which is strict about the characters it allows in this attribute. In Exchange 2007 the following characters are considered valid: Strings formed with characters from a to z (uppercase or lowercase), digits from 0 to 9, !, #, $, %, &, ‘, *, +, -, /, =, ?, ^, _, `, {, |, } or ~. But, no spaces.
Yes, I still use vbscript. Someday, I’ll get to work in an environment where everything is upgraded. Until then, I have to rely on the tried and true vbscript.
One of the most common uses of a Group Policy startup script is for adding users to the local admin group. Just google it and you will find hundreds of scripts doing just that, batch files, posh, vbscript, perl, etc. I wrote the script below because I wanted the flexibility to reuse this script at any client and for any group (not just Administrators but Remote Desktop Users or Power Users).
Most people have a fear of taking their vehicle to the mechanic for even the simplest tasks just to find out they need their transfunctioner adjusted because of wear to the driver’s side steering widget. For many in the SMB market, that same fear can be found in their technology investments. “Did that last IT guy wrap our SQL server in duct tape and tie it to the web server with shoe string?” The reality is often not that bad, but it can be unsettling not knowing.
On Friday (May 6th), Microsoft released the Enterprise Beta Readiness Tool for Office365. As the name implies, this tool is meant to do a quick readiness check on your environment. Upon execution, it will automatically extract the files to C:\office365reskit and launch the app within IE. If you system has IE locked down, this may be problematic or at least require the acknowledgement of a few warnings. As it’s running, it collects information (be patient) from your organization’s network into its temp directory (C:\office365reskittmp). The files within this directory are plain text and offer an interesting look into the environment. Unfortunately, once the test completes, the utility analyzes and consolidates these temp files and deletes the originating files, leaving a technical person with much to be desired.
As is often the case in IT, when you need to push out that software package or migrate that computer to a new domain, it isn’t on the network. This has come up several times in the past year and I wanted to share my solution. Now, this isn’t the “greenest” solution because this will ensure your clients never go into a power saving mode. However, it can be a temporary fix for a project. It can also be adapted to force standby or hibernate at specific thresholds.
Back in 2007, the Microsoft Scripting Guys posted a article titled “Hey, Scripting Guy! Be Careful What You Say.” This article changed everything in the way I scripted because it should how simply you can access some .Net classes through COM callable wrappers. The two they focus on are “System.Random” and “System.Collections.ArrayList”.
Set objRandom = CreateObject("System.Random") Set objArrList = CreateObject("System.Collections.ArrayList") ArrayList # When scripting in AD, Exchange or even the desktop, I am consistently working with arrays. Adding items and sorting arrays always required custom functions, overly wordy statements or re-dimensioning. This made working with arrays cumbersome. Their example for sorting the non-.net way:
For years, I have been bouncing between RSSOwl, FeedReader and FeedDemon. I have built the ultimate feed list for the technologies, blogs and news sources I care about. The real beauty of RSS is it enables one to quickly get up to date on news and industry trends without wasting time. New posts are there, you pick the ones that interest you, star or share the ones you care about and ignore the rest. While many of my peers are wasting their time hitting all their favorite sites and going page by page, I have already read it and moved on to real work.
I’ve been using a routine to determine 64-bit v 32-bit workstations for some time checking the registry for the PROCESSOR\_ARCHITECTURE in the HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment path. However, this was proving to be error prone. So, I just gave up that method altogether since all Windows x64 editions have a “%SystemDrive%Program Files (x86)” directory. This makes it just a quick and easy call the folderexists method of the filesystemobject.
The only downside is that can’t be used remotely but since most of my scripts are used in local policies, this shouldn’t be an issue.