PowerShell snippet: check if software is installed
Some deployment scripts need to check if certain required software is installed on a Windows Machine. You could check if the file is present at a certain location, but there is a better way to check if software is installed: the uninstall database in the Windows Registry. PowerShell makes it really easy to query the registry!
Draw .Net Core project relations with PowerShell and yUML
Having a diagram of how your Visual Studio projects interlink, can be a big help. I’ve created a small PowerShell script that will produce the diagram based on the .csproj files in a directory. It will generate Yuml.me diagrams!
How to debug a StackOverflow crash in a .Net application on an IIS (production) server?
Today we had a problem on the server: our app was causing the application pool to crash. Windows error reporting didn’t give a clear result of what was causing a stack overflow exception within the app. No stack-trace, no nothing. So how to solve a problem like this?
Create mp3 playlist with PowerShell
Playlist are a dandy way of organizing the files into one list (easy to find on your device). The m3u playlist format is a no-hassle straight forward format, that’s why I love it. It is basically a list of relative file paths. Well… if it is that simple, it should be easy to write into a PowerShell statement.
Comparing files with PowerShell
Sometimes you want to test if two files are the same. You could run MD5 or SHA hashes of the files, but it might take some time to compute them. A byte by byte comparison might be the faster instead. I’ve wrote a script doing it in PowerShell.