Powershell script to update firewall rules

This script was created to gather a list of IP addresses from a remote server and update a firewall rule that will allow those IP addresses access to my server via Remote Desktop: Powershell script $tempFileLocation = "c:\\temp\\AllowedIpAddresses.txt" $firewallRuleName = "NAME OF FIREWALL RULE" $url =...

Here is simple c# extension method to format your XML data. This is useful for logging xml data to trace files, etc: public static class XmlDocumentPrettyExtension { public static string Prettyify(this XmlDocument xmlDocument) { var stringWriter = new StringWriter(new StringBuilder()); var xmlTextWriter = new...

Sometimes you need to generate a quick certificate to test your app. Using openssl you can easily accomplish this, take a look at my example below: openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout QA.key -out QA.cert # Merge cert and private key to make a p12 file, this file will be used by .NET's...

I love Github and the concept of open source software. I find myself using these projects on a daily basis so I decided to compile a list and share them with you: ServiceStack – Super fast .NET web services platform. RestSharp – One of the best .NET REST clients. Git Ignore – A compilation of default gitignore files...

I must admit one of my weaknesses has always been writing and understanding regex expressions. I recently found a tool called “RegExper” to assist with my regex expression quandaries. This tool provides you with a visual representation of what the expression does. Try it yourself…head over to...