Querying Remote Servers for Information

While looking through questions in a forum, I found a question about a script to query server information.  The user had a decent start to the script, but also wanted to add some additional properties to include and wasn’t sure how to do that. 

The script that I am including is somewhat similar to an event in this year’s 2011 Scripting Games.  Some of the techniques that I will discuss here I learned by participating.

Continue reading

Posted in Advanced Function, PSObjects, Scripting, WMI | Tagged , , , ,

What…or How do you get something out of Powershell?

Time certainly has a way of getting away from you.  I didn’t realize that it had been about two months since my last post.  Things have been busy at work, recently, and I just haven’t had the time to post anything. 

Over the past couple of weeks, I have been participating in the 2011 Scripting Games.  That was certainly an interesting experience.  The judging is not quite over with yet, but no matter what the scores are, it was a blast to dig in and find out some new things.

Normally, I like to post about a specific type of script, but today, I felt like it would be time better spent on one of the things I learned during these Scripting Games.  To some of the veterans, this is going to be a serious review, but I would like to throw my hat in the ring to document what I learned. Continue reading

Posted in Cmdlet Help, Scripting | Tagged , , , | 2 Comments

Removing Document Icon Definitions in Sharepoint 2007

In my last post, I talked about adding a document icon definition to the DOCICON.XML file.  This article is a companion article that will disucss how to remove a specific definition from the file.  Since it is possible to zero in on the necessary definition using XPath definitions, this script will be a lot shorter. Continue reading

Posted in Sharepoint 2007, Uncategorized, XML | Tagged , , , , ,

Adding Document Icon Definitions in Sharepoint 2007

A large part of my job requires me to manage and support a large MOSS 2007 environment. While I do have a lot of other people from other teams who help support it, the team I belong to is quite small. With a small team, anything that I can do to save myself some time is beneficial. That is a major reason behind my push into Powershell. There are so many things that you can do with Powershell since it is based on the .NET Framework. Continue reading

Posted in Sharepoint 2007, XML | Tagged , , , , , ,

Using Powershsell to Access SQL Data

A couple of weeks ago, I was asked by a colleague for help on querying data from a SQL server.  In this particular case, the guy was trying to gather the names of servers and their patching groups from our corporate configuration database.  While I am unable to present the exact information due to corporate confidentiality agreements, I thought that the process used to gather the information might be useful for someone.  Continue reading

Posted in SQL, SqlClient | Tagged , , , , , , | 2 Comments

Gathering the Number of Event Log Entries Over a Given Time-frame

Today, I needed to gather some statistics on a particular error message in the event logs of my servers.  We have been experiencing some problems this week on occasion that have been a little difficult to isolate.  The developers who are working on this with me have set up a separate event log to capture events from the application platform.  Unfortunately, this log rolled over after three to four hours.  While we didn’t have visibility to see further back in history about some errors we were seeing, I could use Powershell to gather information on how many of the errors we were getting in an hour. Continue reading

Posted in Event Logs, WMI | Tagged , , , , , | 2 Comments