PowerShell Ping Test

Posted by gygon on Wednesday, November 16th, 2011

Used this little script the other day for a basic network test to an access point I was testing. It just pings the device every 10 seconds (or whatever you set it at) and only outputs when there is an error and the time it occurred. Made for an easy way to leave this running over […]

continue reading

Using PowerShell to monitor a web server

Posted by gygon on Monday, November 14th, 2011

A couple years ago I posted about a PowerShell script that would read in a web page. I used that to setup a basic web site test to go through a list of web sites/servers and make sure they were up and running and email an alert if they were down or the size of […]

continue reading

Monitoring the Event Log with PowerShell

Posted by gygon on Saturday, March 21st, 2009

One of my goals with learning more about PowerShell is to be able to monitor the event logs on servers and notify me via email when certain events happen. The system I’m looking to monitor are not part of a domain, are in remote locations on isolated networks. Some of the main things I’m looking […]

continue reading

Exchange 440 Login Timeout

Friday, February 25th, 2011 - Tech, Windows

Had an issue with an old Exchange 2003 server the other day….in the middle of the day users were disconnected in Outlook (using RPC over HTTPS) and when trying to log into the Exchange web page to view mail, users received the error “440 Login Timeout”.

Did the generic solve-all of rebooting the server but that didn’t help…then after looking around I found this article and followed the steps which fixed the problem.

In my case it was step 2 that fixed the problem, updating the folder permissions in IIS. I’m still not sure how/why the permissions changed, especially since it did it in the middle of the day and not while making changes on the server.

Moving to Google Aps…testing

Thursday, December 30th, 2010 - Google, Tech

It’s about time to replace the aging Exchange 2003 box. Rather than running my own system I’ve been looking at making the change over to Google Aps. The main reason for this is to eliminate one more system that I have to deal with as well as eliminate the 3rd party mail filter and just have everything in one. Being frugal I’m looking at the free/standard edition so that means giving up Outlook…the only thing that I’ve been worried about. I set it up the other week as a trial and have been using both just to get a better idea of how it will work and if there’s any issues. Here’s what I’ve found so far…

I like it a lot. The spam filtering works great and after getting used to Labels vs Folders I like it a lot. The interface on my phone and new iPad are great as well. The one thing I’ve run into that I do now and then and need to look into is pasting images into emails. I tend to take snapshots of a report on my screen and email it out to several people. This is no problem in Outlook and it just shows up in the email…not sure I can do that in Gmail without attaching the image…have to look into that one some more.

There’s still a few things I need to test out, like the ScanSnap document scanner I use daily…currently it allows scanning and attaching a PDF directly to an email. Not sure I can set this up to work with Gmail…it would mean having to always save the file, then attach and send an email. Would work but it adds a few steps for something I do a lot.

Another quirk is vieiwing Excel attachments. I get these a lot also…when I use the link to view as HTML in GMail, none of the data shows up so that’s useless. I can view as a Google spreadsheet which works fine except the images/graphs don’t show up. So looks like there’s an extra step there to download then view. Again, not a major issue, just makes things a little slower.

On the plus side, opening Gmail in the browser definitly saves time compared to opening Outlook…usually took a while to open and sync new messages from Exchange so even though I’m losing some time with certain steps, I do gain some just opening mail every day!

Copy file and append date and time

Thursday, December 9th, 2010 - Tech, Tips, Windows

Recently set this up for someone and then had someone else looking to do the same thing about a week later. Figured it would be good to post it here for future reference.

The first example adds just the date:

@echo off
REM *****************************************************
REM **  DatedBackup.bat
REM **  This batch file will make a backup copy of
REM **  the file "example.xlsx" and append the current
REM **  date in YYYYMMDD format to the current directory
REM **
REM *****************************************************
@For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Day=%%A
Set Month=%%B
Set Year=%%C
Set All=%%C%%B%%A
copy "example.xls" example_%All%.xls

The second example adds both the date and timestamp:

@echo off
REM *****************************************************
REM **  DatedBackup.bat
REM **  This batch file will make a backup copy of
REM **  the file "examplefile.pdf" and append the current
REM **  date (in YYYYMMDD format) and timestamp
REM **  to the current directory
REM **
REM *****************************************************
@For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Day=%%A
Set Month=%%B
Set Year=%%C
Set All=%%C%%B%%A
@For /F "tokens=1,2,3 delims=:,. " %%A in ('echo %time%') do @(
Set Hour=%%A
Set Min=%%B
Set Sec=%%C
Set Allm=%%A.%%B.%%C
@For /F "tokens=3 delims=: " %%A in ('time /t ') do @(
Set AMPM=%%A
copy "examplefile.pdf" examplefile_%All%_%Allm%%AMPM%.pdf

Some reference:

Thin client Setup notes HP t5740e

Wednesday, December 8th, 2010 - Tech, Tips, Windows

While setting up a new HP t5740e thin client for testing, I needed to install Adobe Reader. The problem was I kept getting the error that there was not enough room on the drive. There was still over 3GB remaining but the Temp drive (in My Computer > Advanced > Environment Variables) was setup to point to a ram-drive that only had about 15MB free. Solution is to change this to the hard drive, run the install, then change it back. I’m sure I’ll run into this again and will forget what the issue was.

The other item that I like so far but took a few minutes to figure out is the endpoint security tool that is installed on the system by default. It blocks most traffic in and out of the system. Needed to put in some exception rules to allow our LOB apps to run.

Map Printer and Set to Default in Batch File

Wednesday, December 8th, 2010 - Tips, Windows

While setting up a new thin client system (HP t5740e) to test with I wanted to make things as easy on myself as possible when it came to the printers. I know we go through printers and have to change them out as they die…I didn’t want to have to log in to each system and change the printer settings and then save the updated image….especially if it happens during a busy time. So I went with what I think is a good solution to update the printers easily…map them and set the default through a batch file that is stored on the server.

The thin clients are currently running Windows Embedded Starndard 2009 (aka Embedded XP) and once we finish testing I plan to upgrade them to Windows 7 Embedded to compare. Here’s the batch file that is on the server that is run to map the printer, the original was found at

@echo off
REM Add printer
echo If Prompted, enter the following login information...
echo  - Username: demo
echo  - Password: DemoPass
echo Installing [HP2015] on []!
RunDll32.EXE printui.dll,PrintUIEntry /in /n \\\HP2015
echo Your default printer is [HP2015] on []
REM Set Default Printer 
RunDll32.EXE printui.dll,PrintUIEntry /y /n \\\HP2015

Just to note, lines 3-5 are there for the systems that are not on a domain and are just connecting to another computer on the same workgroup. To make testing easier I just have the user enter the credentials.

Customize the WordPress logo on the Admin Page

Friday, November 19th, 2010 - Uncategorized

Found this cool little snippet on how to change the WordPress logo on the wp-admin page. This is really helpful when managing multiple sites as I find myself trying to log into the wrong one often…makes it really obvious what site you’re trying to log into. The info and code are from :

//Custom Login Screen
function my_custom_login_logo() {
    echo '<style type="text/css">
        h1 a { background-image:url('.get_bloginfo('template_directory').'/images/dbdlogo_sm.jpg) !important; }

add_action('login_head', 'my_custom_login_logo');

function change_wp_login_url() {
 echo bloginfo('url');

function change_wp_login_title() {
 echo get_option('blogname');

add_filter('login_headerurl', 'change_wp_login_url');
add_filter('login_headertitle', 'change_wp_login_title');

AT&T Uverse

Wednesday, March 24th, 2010 - Tips

Made the switch today over to Uverse (the Voice, TV, and Internet service from AT&T.) After reading what I could find on it I wasn’t sure what the installer would want to do to setup at our house so rather than trying to pre-run wire, I just setup conduit through the attic to where I wanted everything to try and minimize the install time.

I have to say I was very impressed, the first installer showed up ahead of schedule and made the updates outside….also found out I was the first one getting hooked up in the neighborhood that they had just installed the equipment and he wanted to know how I found out so quick. The second installer to wire the house showed up on time and we went to work. He recommended going with the coax cable to connect the DVR & Receiver rather than Ethernet because it was running through the attic & walls…he said he’s seen better service with the coax just because it tends to be better shielded and hold up better. The thing I liked most of all was unlike previous field techs that have been here, this installer seemed to take pride in his work and took the time to make sure the cables were neat and didn’t look like it was done as fast as could be done to get out. It may have taken an extra 10 minutes but he spent the time to make sure the cables were secured and the holes drilled neat & the correct size. It was a pleasant surprise.

After everything was hooked up, I got the Internet speed I expected (12/2), home phone, and HD TV…all with cutting my monthly bill by about $30.

I will say after having used Tivo for the past few years, the interface on Uverse is not as user friendly. Nothing compares to Tivo for the features & user friendliness. Uverse isn’t bad, it’s just not as smooth and easy to do what you want. For instance, yes I can setup to record a series without problem, but by default it seems if it’s on another day & time, it’s not going to record unless I change the defaults. Also I miss the keyword record feature where I could specify say “Bill Gates” and anything that had Bill Gates in it would automatically record. Maybe in time…still need to play with it more to learn all the functions.

Custom iPhone Ringtones

Sunday, March 21st, 2010 - Apple, Tips

Found a step by step guide on how to create ringtones for the iPhone from your own audio files and wanted to make sure I could find it again so here are the steps:

1. Listen to the song you want to make into a ring-tone and note the start & stop times of the portion you want to use (or use the whole thing if it’s less than 40 seconds)

2. Open iTunes

3. Right click the song and select “Get Info”

4. Click the Options tab

5. Type in the start and stop times (if needed) and click OK

6. Right-click the song again and select “Create AAC Version”

7. Wait for iTunes to finish creating the file, then right-click the new file and select Delete

8. When prompted, click on Keep Files button.

9. Find the file. It’s usually in your User folder under Music > iTunes > iTunes Music > Band Name

10. Rename the file extension from .m4a to m4r

11. Double-click the file to open it in iTunes. It will automatically import into the ringtones.

The steps above were originally found on the ehow website from Alexia Petrakos.

Apple Genius

Friday, March 19th, 2010 - Apple

So after my wife & I got a pair of iPhones I was trying to get more info about syncing them to the same computer in the house. Not being able to find any definitive info online we decided to stop by the Apple store and ask. After standing in line for a few minutes and realizing that they don’t seem to be helping people from the line we were able to grab someone walking around the store who was helping someone and he said he’d come back and help us. Ok, no problems there. Several other people had come in and were asking us if we were in line…after telling them the story we all decided they really needed some organization help.

So when he finally got to us and we asked about syncing the two phones, he had no idea. No offer to ask someone else, somewhere to find out, just no we can’t do that. Asked about changing the audio notification for new emails and again he didn’t know…just asked to look at my phone to look at it and finally said, “no, doesn’t look like you can.” Gee, that was helpful!

Fortunately, I decided to call the support number from the website and talk to someone who actually knew the product and could answer the questions and provide info on where to request new features and find out info. Moral of the story…the in-store “Apple Genius” don’t live up to their title by any stretch. If you need help, I’ll stick to the phone support.

Power Efficiency Diagnostics Report

Sunday, January 17th, 2010 - Tech, Windows

Cool little utility built into Windows 7 to survey your computers energy efficiency. Run a command prompt as Administrator and run the following:

powercfg –energy

This will run for a minute and then create a report for your system. The filename and path will be shown when it finishes running. Note that you may need to copy the html file from the \windows\system32\ folder to your desktop (or other folder the user has permissions on) before you can open it.