Tags: powershell

Bulk rename Subversion files with PowerShell

Scenario: We’re upgrading our reporting software at work, and the way that it used to integrate with SVN (through a terrible SCC bridge) involved arbitrarily placing “app_” at the head of the file names. Of course, in the new version, they no longer do this, and so all of our SVN references are out of whack. While renaming all of them to remove the “app_” at the beginning isn’t the entire solution, it’s one step I had to follow that I believe will be of benefit to others. Read More →

Batch convert audio files to MP3 with PowerShell and VLC Player

I adapted a PowerShell script by Tim Van Wassenhove that recurses through a given directory, searching for various types of audio files. These files are then converted to MP3 using VLC Player’s command-line interface. My adjustments to Tim’s original script include some string handling bits that ensure filenames with potentially dangerous characters (apostrophes in the case of the VLC command line, and square brackets in the case of the Remove-Item call) are taken care of. Read More →

Programmatically compile Audiences in SharePoint 2010

According to the documentation for the SharePoint 2010 SDK, you cannot trigger Audience compilation programmatically. Well—that’s not true. It isn’t documented, but it is possible. The painful thing about it is that you must know the ApplicationId of the UserProfileService application. This is where reflection comes in extremely handy! Read More →