Archive for April, 2010

PowerShell Basics #5: Manipulating services

Although you can start and stop the Windows services on your computer with the net.exe, PowerShell makes it far easier to do more complex manipulations. Start by doing a Get-Service – or just casually called gsv. PS D:\PowerShell> gsv Status Name DisplayName —— —- ———– Running AEADIFilters Andrea ADI Filters Service Running AeLookupSvc Application Experience […]

April 29, 2010 · Jouni Heikniemi · No Comments
Tags:  · Posted in: .NET, Windows IT

Getting a list of all types in the GAC with PowerShell

Surprisingly, it became necessary to list all the types in the assemblies loaded in the GAC. Getting the list of assemblies from the GAC isn’t hard, but then you need the types – and that requires some more programming. I think this example greatly demonstrates the might of PowerShell. You can easily combine traditional text-based […]

April 16, 2010 · Jouni Heikniemi · No Comments
Tags:  · Posted in: .NET

TechEd Online will be free soon

Most large Microsoft conferences have had their materials pretty openly published, PDC and MIX being perhaps the most watched ones. However, TechEds around the world have been less open: the conference materials are only available to attendees and TechEd Online subscribers (~$300/year). That’s about to change now. As a TechEd Online subscriber, I received an […]

April 15, 2010 · Jouni Heikniemi · 2 Comments
Tags:  · Posted in: General

Enabling MSI installations on Windows Server 2008 via PowerShell

Did you know that by default, there are limitations on installing MSI packages on Windows Server 2008 and Windows Server 2008 R2? Neither did I, but you live to learn. MSDN documents this quite well if you know what to look for. According to the page the server OS default is to disable MSI for […]

April 7, 2010 · Jouni Heikniemi · No Comments
Tags:  · Posted in: Windows IT

The one operator I want to see in C#: ?.

As Eric Lippert published the April Fool post for new operators –> and <– in C#, the old idea of ?. came back to me. The dilemma I’ve been considering this for some time, and I’m half-serious when suggesting this. C# already has the great null coalescing operator ?? that allows me to treat nulls […]

April 5, 2010 · Jouni Heikniemi · 9 Comments
Tags:  · Posted in: .NET

Extracting media files from a PowerPoint presentation with PowerShell

Ever needed to extract all the media files (images, video etc.) from a PowerPoint presentation? Copy/paste does it, but getting the stuff into separate files is a chore. Unless you speak fluent PowerShell, that is. The following script defines a function that takes a full path (including the directory) to the PowerPoint file. It then […]

April 5, 2010 · Jouni Heikniemi · 8 Comments
Tags: ,  · Posted in: .NET