Archive For The “Powershell” Category

Powershell to recursively strip C# regions from files

Here’s a super quick little powershell snippet to strip regions out of all C# files in a directory tree. Useful for legacy code where people hide long blocks in regions rather than encapsulate it into smaller methods/objects. Run this in your solution folder and support the movement against C# regions!

Read more »

Powershell script to find orphan stored procedures

Working on a legacy application that uses over 2,200 stored procedures, it can be hard to keep track of which ones are still active and which can be deleted. Here’s a quick PowerShell script I wrote that locates stored procedures in a database that aren’t referenced by code or other database objects (assuming you have […]

Read more »

Remove content from files with Powershell

I love Windows PowerShell. It’s the missing

Read more »