Sunday, October 24, 2010

Using Write-EventLog…

I was trying to use the Write-EventLog cmdlet and was noticing additional annoying text being added to the messages.  For example:

PS> write-eventlog -logname "Windows PowerShell" -source PowerShell –event 999 -message "Hello"

Looking at the resulting event, I would see this added:

"The description for Event ID 999 from source PowerShell cannot be
found. Either the component that raises this event is not installed on
your local computer or the installation is corrupted. You can install
or repair the component on the local computer...."

I didn’t want this extra text, and couldn’t seem to figure out the problem, then came across something that Stefan Stranger did HERE:

if(![System.Diagnostics.EventLog]::SourceExists($source))
{
[System.Diagnostics.EventLog]::CreateEventSource($source,'Application')
}

The trick to getting rid of this extra text was to make my own custom source for my events.  Now, the extra text is gone.  I just made up “PowerShell_script”, and used that in my script.

Friday, October 1, 2010

Microsoft MVP for another year…

Today is my re-award date, and I just received a pleasant surprise.

I have been awarded a Microsoft MVP award (PowerShell of course!) for another year.

Looking back, I’ve eased up on blogging (and haven’t been able to tweet all that much), but I’ve been pretty active in other areas, and am looking to continue that for the foreseeable future.

Microsoft: Thanks for the recognition.

Saturday, September 25, 2010

Using SSH to invoke PowerShell remotely (PDF)

Here’s something I wrote last Spring that provides a step-by-step on how to call PowerShell remotely using password-less SSH from a Linux-based server to a Microsoft Windows 2003 Server.

It’s a PDF you can get HERE.

Wednesday, July 21, 2010

Cool application: Sapien’s PrimalMerge 2009

Although I’m quite busy, I try to find time to try out new products when I can.  I’m especially excited when I can try out one of these new programs to help resolve a problem I’m having.

I don’t have any kind of personal script versioning setup, so finding what has changed from one version of one of my scripts to the next can depend on whether I’ve added change comments in my scripts.  In this particular case, I didn’t have any comments.  What to do?

Fortunately, I have access to Sapien’s PrimalMerge product, and could very quickly and easily see what the changes were between my 2 scripts.

It saved me big time in this case!

Friday, June 11, 2010

TechEd 2010 in New Orleans – a brief report

I’m on my way back from my first ever TechEd.  What a great experience.  I was mostly working the PowerShell booth and trying to talk with vendors and attendees, but I did get to attend 2 PowerShell sessions.

It’s difficult to scan a big audience, but those 2 sessions had likely between 300-500 attendees each!

The impression I got from TechEd last year was attendees were mostly asking if they had to learn PowerShell…  This year, things have really turned around!  Most people I talked to were using it or actively wanting to learn it.

It’s no longer “do I have to learn PowerShell?”, but instead it’s “how do I learn PowerShell?”.

For lucky attendees, we even gave out (for free!) a few 100 copies of William Stanek’s “Windows PowerShell™ 2.0 Administrator's Pocket Consultant”.  The book is available HERE.

Using Windows PowerShell with the Amazon Web Services (AWS) SDK for .NET

I recently had the opportunity to write an article for Amazon on how to use their .NET-based AWS SDK with PowerShell.

You can find the article HERE.

It’s a pretty basic PowerShell article geared more for AWS users.  It shows how to load the SDK then use some of its features to get a listing of objects stored on the S3 service, and also shows how to upload local files (for backup purposes basically) to the service.

If you have any questions or comments, please don’t hesitate to post them here or by commenting on the article itself.

Sunday, May 16, 2010

TechDays 2010: My speaker bio is up

If you’re from Canada, you must have heard that TechDays is coming back for another year!  TechDays is coming back to Halifax again this November 2 and 3.

I’m excited to have another chance to get up in front of a local crowd and spread my knowledge and make contacts, but also learn from what others are going to present.

My bio is up HERE.  The content is still being worked on so I don’t what I’ll present exactly, but I’ll be looking to submit a session for their new community track (“Local Flavours”) tentatively titled: “Windows PowerShell: Automating Clients, Servers, Clouds and Everything in Between”.