Monitor File or Directory Changes with PowerShell and Email Changes

I had a need to monitor a file/directory for changes, or more specifically entries into an error log by an application. I wanted a trigger on file change using a PowerShell or some other script, since the application didn’t have alerting capabilities built in. I wanted a script to check read the log file and send an email when the file changes containing what was changed, or in this case what the error was.

You can tweak the script to monitor a directory or specific file, and customize the email with the file name or more. Either way this is the basic script. Schedule a task in Task Scheduler (Windows 7) or Scheduled Tasks (Windows XP) to run at login for that specific user, and make sure it never terminates or times out. Set your application to run:
Continue reading Monitor File or Directory Changes with PowerShell and Email Changes

Get Recursive Group Membership of Distribution Group (PowerShell)

I spent part of the day yesterday looking for a good way to dump members/users of a Distribution group. No big deal except this situation has many levels of nested groups. There’s a Quest (Dell) PowerShell snapin that will do this, but why install anything else on  a production server that doesn’t need to be there? I did, however, find an article for Exchange 2007 that did something like this, but when using it for 2010 it didn’t work for my needs. I just needed something simple that would work with Exchange 2010 and would run “out of box” on the server… Here’s what I came up with: Continue reading Get Recursive Group Membership of Distribution Group (PowerShell)

Create VDI Larger than 2TB XenApp 5.6 SP2 (5.6.102)

I’ve been setting up a new XenServer with a Mirrored 250GB volume, and a RAID 5 volume with three 2TB disks. The mirror is holding the virtual servers, and the Raid5 is to be used for snapshots and the file storage. I’ve looked for a few days now trying to find a solution to exceed the 2TB limit in the new XenServer and I finally found it here.

Credit to Scott Bigliardi for this:

  1. Begin by finding the uuid of the SR:
  2. Get the volume group device name:
  3. Create the new logical volume, with a proper name:
  4. Change 3T to 4T or 5T (etc) to specify the size of your giant VDI

  5. Tell XenServer to scan the SR:

After scanning the SR, the new VDI magically appeared under the Storage tab for this SR in XenCenter.

I then gave it a name and description, and assigned it to a VM just like any other VDI.

True Aero Firefox – Make it transparent!

It’s all pretty easy… Just edit your userChrome.css file found under %appdata%\Roaming\Mozilla\Firefox\Profiles\<your profile>\chrome to include the below. Of Course I have the All-in-One Side bar (which is awesome), and a few other add-ons which I will list later, but here you go, or download it HERE:
Continue reading True Aero Firefox – Make it transparent!

Sign Into Multiple Google Accounts Simultaneously

Finally!

Just sign into your Google Account, access the Account Management page, and then look for Multiple sign-in under Personal Settings. Click Change, then follow the prompts.

Sign Into Multiple Google Accounts Simultaneously

My Frequently Used Screensavers

My Frequently Used Screen Savers:

Run Windows Applications In Elevated Mode (UAC Prompt) sudo for Windows 7

So how do you get a batch file to run as an elevated user? For example, I have a batch file that will copy the contents of an XP user’s profile to a Windows 7 user’s profile. The only catch is that the Windows 7 user profile structure is different, and the batch file must be run elevated in order to read the junctions so as to not fail the copying. So how do you do this without having the user right click and “Run as Administrator”? Elevation PowerToys for Windows Vista 7. This file contains a ton of useful scripts for the admin, or even the average power user. I can’t believe this has been out since June 2008 and i’m only finding it now! Great tool without having to use the runas command, or play with a Power Shell script. This will most certainly be deployed on all my future Windows 7 machines!

The two key files in this package are:

  1. elevate.cmd (+)
  2. elevate.vbs (+)

The CMD is a simple batch file that will pass arguments into the VBS file. The VBS file will prompt the end user with the typical UAC prompt to allow or cancel, or display a usage box if no arguments are specified.

I only made one slight modification, since I would always be launching this from a Run or Command window. I changed the last line in the batch file to read:

I dumped these two files in my C:\WINDOWS\SYSTEM32 directory, and renamed them to SUDO.CMD and SUDO.VBS. I no longer need the Start++ application for the sudo command!
sudo for Windows 7

Install Flash on Ubuntu 10.04 (lucid) 64bit

Credit to “My Science is Better” for the tutorial on installing native 64bit Flash Player 10 on Linux. You can find the article here, but most importantly the script here.

chmod +x the script and run it…

Since I lost my tapt script, here’s my mirror…

Fix PDF Viewer on Windows 7 x64 with Outlook 2007

Followed directions from:

http://www pretentiousname com/adobe_pdf_x64_fix/index.html (LINK REMOVED)

This fixes the PDF Preview Viewer integration with Outlook. This prevents you from having to open the PDF and you can now view it like other office documents. Bug with x64 bit versions of Windows and Adobe.

Download it here: adobe_pdf_x64_fix

Keep track of your apt-get’s with tapt

Yes, I run Ubuntu, and I love it. But the problem is that I need Windows, and a Virtual OS isn’t good enough. Therefore I don’t get the time to use Ubuntu as much as i’d like too. As Ubuntu keeps updating, so do the the features and usability. I always use “sudo apt-get” to install my programs, but after several months of time between tests, I always forget which apps I installed. Continue reading Keep track of your apt-get’s with tapt