Practical Joke Turns Into Lesson Learned

When I returned to work this morning after my excellent getaway I learned of a power outage on Friday afternoon that took down the desktops in the Systems Administration area.  Oh great! 

When I logged into my machine, the login screen was different and then all of my files were missing.  Oh no, my profile is hosed.  No wait, there are no files under a previous profile.  Oh crap!

After getting thoroughly pissed off that my day would be filled with installing software and recreating my machine, a sinking reality set it.  I have a bunch of project files on my desktop that have not been saved to my share drive.  I know better, but sometimes we don’t always take heed to our own best advice.    Today, I thought was a good day to correct that. 

The practical joke was that my buddies switched out the hard drive so no files were lost.  This time!

I found a PowerShell Script to Backup Files Using Windows PowerShell and set it to backup my desktop to share drive automagically using task scheduler.  I’m still testing it to see if it is the script to do what I need it to do.  I could write one myself, but I am a PowerShell newbie and why reinvent the wheel. 

Enjoy!

[Edited:]

The script above did not work out too well as it did not copy over folders.  I created a simple script with the following line:

  • Copy-Item c:\Users\ewatson\desktop s:\ -recurse

 That did the trick!

About Ed Watson

Florida Gator and Certified SQL Server Enthusiast, Star Wars fanatic and is there anything else...oh yeah PS3! I am a geek and SQL Server DBA who dabbles with VMWare, there are other technologies greater than these? Not so fast my friend! I also love to travel to new and exotic places.

Posted on April 16, 2012, in Lessons Learned and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 1,291 other followers

%d bloggers like this: