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!

Advertisement

About SQLGator

Microsoft Data Platform MVP, Florida Gator, Star Wars fanatic and is there anything else...oh yeah PS4! I am a geek and SQL Server Business Intelligence Consultant, 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. 1 Comment.

  1. FYI, you can have OneDrive automatically backup your Desktop, Documents, and Pictures

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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: