Skip to main content
I'm streaming on Twitch right now. You should stop by. Let's go!

Tagged: powershell

  • Using ASP.NET connection strings in PowerShell scripts


    I found a trick for loading ASP.NET connectionString elements from configuration files for use in PowerShell scripts, and I figured I would share it with the class. They are, as should have been obvious to me much sooner, simply XML nodes in an XML document. This comes in pretty handy when you have …

  • Circumvent Get-ADGroupMember limit in PowerShell


    If you've ever tried to pull the members list of a large AD group with the Get-ADGroupMember PowerShell cmdlet, you will undoubtedly have run up against an error message telling you that the limit has been exceeded. There is, however, a way to work around this limitation: Using Get-ADGroup and some creativity.  …

  • 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.  …

  • 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.  …

  • 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!  …

View all tags