Skip to main content

Tag: 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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading