May 29 2009 9:58PM GMT
Posted by: Colin Smith
Exchange,
Exchange Management,
Powershell,
Exchange Scripting,
Scripting
I was just asked to take a look at writing a script for our new Exchange environment. Now I do not have a lot of experiance scripting for Exchange but I love a Powershell challenge. The problem was that all of our distribution groups had been set up with one option incorrect. I was asked if I could script a change for all groups. If not then this would take days, perhaps weeks to fix by clicking on every group and changing the option and saving.
I logged into the exchange server and started tooling around. I found that I could get a list of all the groups by doing a simple get-distribution group command as follows:
get-distributiongroup | select name
This gave me the names of all groups. I sent that to a flat file to use later. I then used the get-member command to find the option that I needed to modify. Then I was able to do a set-distributiongroup “name of group” -proertyname 0. That command made the modification that we needed. After verifying that I wrote a foreach loop and I was done in less than 30 minutes. When I called our IT director back and let him know that it was complete he was shocked and very happy. Powershell can make you look very good to upper managment.
Let me know if you have anything that you need a script for.
May 29 2009 3:02PM GMT
Posted by: Colin Smith
Internet,
Fun,
Shopping
I love the internet. I really do, I mean I do not know how I lived without it. The internet makes so many things possible. I am good at my job and I am a smart guy, but I do not know how IT people did it before the internet. I Google and search online for so many issues that I have never seen before and odds are someone else has and they have put the solution, or at least what they tried, on a blog of somesort. But it is so much more than that. Where else can you go shopping 24 \ 7 and almost always find the crazy off the wall thing that you were looking for? Like I went Golfing last week and I was having a horrable game. I got mad and threw a club down at the ground after miss hitting the ball with that club 3 times straight. The club broke, clubhead sheard right off the shaft. This was a set that I had gotten a few years ago and is not made any more. I got home searched for the club and three days later I had a replacement club that matches my set. This would have been near impossible before the internet. I mean really how did anyone get anything done?
May 29 2009 2:56PM GMT
Posted by: Colin Smith
Editors,
Scripting,
Managment,
Systems Managment,
Tools
We all like notepad since it is quick easy and very lightweight. But what if it just does not do all that you want? Well I have used programs like Ultra Edit and I love it. The downside is that it is not as lightweight, you have to buy it, and the intallation is a pain. Great App and it does just about anything that you could wish for. I have found an alternative to this though. It is lightweight, free, and install could not be more simple. It is Notepad++. This may not have all the features of Ultra Edit and other programs like that but it can do so much. Multiple tabs, text highlighting, great search and replace, and if a feature that you need is not there then you may find a plugin for it. Like I really like the compare feature of many editors and this did not have it. I was able to get it though. Just download and install the plugin and you are ready to go. If you do not see a plugin that works for you then you can write it. I love that. I have not done that but I know I can try if I need added functionality.
Give it a try: get it at http://notepad-plus.sourceforge.net/uk/s…
May 29 2009 2:49PM GMT
Posted by: Colin Smith
Powershell,
MSSQL,
SQL,
Scripting,
Database Administration
In my environment we have some servers, test servers, that are loaded from the Production Servers on a regular basis. Since this is the case I have decided that I would like to attempt to script this. I just started but I am already well on my way to getting this done. I am pretty sure that I will be able to do what is needed here, I just need to take it slow and work through the issues as they arise.
So far I have been able to have the script list all the instances that may need to be loaded and ask what instance you would like to load. I select the number next to the instance, try to avoid typing errors, and the script then determines what host this instance needs to be loaded from. So essentially I have done all of my variable setup at this time. Here are the rest of the steps that I have in mind for this script.
Once I know the host and the destination servers I will connect to the destination and delete any backups that I might have on disk. I will not need them anymore since I am loading from Prod anyway. I will then check to find out the amount of free space that I have on the disk and compare that to the size of the production backup file. If I have room then I will copy the prod backup to the test host. Once that is complete I will lock all logins, kill any spid in the target DB, and then load the DB. After that is complete I will have to deal with users in the DB and making sure that I can match them up with the appropriate logins. Then I will make the DB available to users again by enabling the logins.
Simple enough plan but I am sure that I will run into some hurdles along the way. Should be a fun script to do though. Any thoughts or ideas about this script please let me know.
May 29 2009 2:41PM GMT
Posted by: Colin Smith
Powershell,
IDE,
Scripting,
Systems Administration
I have been using PowerShell Plus for my PowerShell IDE. It is not free but I really think that it is the best IDE for PowerShell. They released version 3.0 not to long ago and it is even better. Along with the great code editor, debugger, and interactive window, they have added a learning center, and a nice little quick click library. this library is a side bar on the interactive Console that has some simple one liners that come in handy. Just click it to run it. They have them broken down into groups like computer managment, Printer managment, and Network Management just to name a few. Please check it out and support a great product. Try out the 30 day trial at least.
http://www.idera.com/Products/PowerShell…
May 29 2009 2:36PM GMT
Posted by: Colin Smith
MS SQL,
SQL,
SQL Server,
Education,
Certifications
I have been talking about what I would like to do to further my education and my carreer as a DBA. I started reading the books in order to study for my MCITP DBA certification and the other members of my team decided that they would like to do the same. They both ordered the books as well and now we are going to attempt to get the certification as a team. We just started working as a group on this and we are doing a 3 hour study session per week and trying to get three chapters of the book done per week. We read the chapters on our own and then we can work the problems, case scenarios, and the examples in the book together. This is great since if any one of us has any questions we can talk about it and make sure that we all understand the concepts.
I think I will gain the most out of this arrangement since I am the new guy still and they have a lot more experiance than I do. I recommend trying to do this type of thing in a group for a couple of reasons.
1. For me this will really push me forward and I will be more driven to get it all done
2. I work better in a group and if I have others that understand concepts I learn best from them.
May 20 2009 4:32PM GMT
Posted by: Colin Smith
Study,
Education,
Scanner
My wife is still in school and she wanted a way to scan lines from her book into some application in order to print notecards. She found the solution and it works really well. Thought I would pass it along to you all. It is called the Iris Pen.
http://www.irislink.com/c2-1056-189/IRIS…
This is a cool highlighter sized scanner with a pretty good OCR. It types what you have scanned into any application. I have set it up on her Netbook and she is using Word 2007 with the Avery 5388 3X5 Index card template. It scans the text right in and then she can manipulate it in any way that she wants. Ie, bold, italic, hightlight, ….
If you are looking for a small handheld USB scanner that can scan directly into an application then this is it. I am sure that I will use it to make flashcards for me as well for the MCITP tests. I really think that it will help make my study faster as well.
Check it out.
May 20 2009 4:27PM GMT
Posted by: Colin Smith
Database,
Database Administration,
Oracle,
Upgrade
Last Sunday morning I came in to work at just after 2:00 AM and did the upgrade on our Production Oracle system. Since I had done this a few times on our test system I was ready for anything to happen. I had already installed the new version of Oracle and so I brought the DB Down changed my $ORACLE_HOME and went to work. Launched the DBUA and saw no instances available for upgrade. I closed DBUA and went to my oratab file and I saw that my current 9 version entry was in the file. Also had some commented out instances. I tried again and had the same result. Back to oratab and I deleted all the commented entries out. Now I can see my instance in DBUA.
Let DBUA do its thing and I was done in less than 2 hours. Since I was prepared for anything, almost nothing went wrong. We have been live with Oracel 10.2.0.4 since then and have had no issue.
May 20 2009 4:26PM GMT
Posted by: Colin Smith
Fun,
Games,
Nintendo
Yesterday on my way home I stopped and picked up the new Punchout Game for the Nintendo Wii. I was a huge fan of Mike Tysons Punchout on the regular NES so I was pretty happy to see Punchout come to the Wii. I did not know that you can use the balance board with this game as well. I thought that was pretty cool. You use it for ducking and dodging. I found that it seems to be a bit slow to react so it is tough to get your timing down on it. It is a lot of fun though. If you were a fan on Mike Tysons, or any in the Punchout series I think that you will love this game. Some old familiar faces and some new ones appear in the game.
have fun and get a workout while doing it. Let me know what you think of the game.