Database, Software, and System Engineering


Importing and Exporting Windows Features with PowerShell

This applies to Windows 7, Windows Server 2008 and Windows Server 2008 R2 and the use of Get-WindowsFeature and Add-WindowsFeature.  For Windows 8, Windows Server 2012, and Windows Server 2012 R2 Microsoft has overhauled these two cmdlets that I’ll handle the same usage in a different post. First the cmdlets we need are in the server manager module […]


PEM Certificate from .NET/PowerShell

It is a tough thing – cryptography.  Especially when you try to standardize it enough for consumption among various components on hosted on multiple platforms.  Microsoft has done a good job of making their import features agnostic to file format.  Other platforms are not so forgiving and require it to be very specific based on […]

Using Write-EventLog cmdlet in PowerShell

I set out to create a standard method of interacting with the Write-EventLog cmdlet.  Simply put it will fail and I think it shouldn’t.  It could be a little more robust, so I created my own function that is.  The big thing that most people will benefit from is the ability to create a new […]


Asymmetric Encryption of Text using x.509 Certificates in PowerShell

I’ve been requested to encryption sections of my script (user name/password) using a certificate issued by a trusted CA.  No problem. To do this in the blog, I’ll I created a self-signed x.509 certificate and a CN of “PowerShellCert”.  I will use the public portion of the certificate in a file that’s base64 .cer to encrypt the […]

, ,

PowerShell for Free Space?

I needed a script that could be executed to report free space.  I’ll review how to do it locally and how to wrap it around an array of computer names so it can be ran from anywhere with RPC access to the target machines. For Starters Here’s the script that gets my my report from […]

, ,

WinRM for an Environment Simplified

Windows Remote Management (WinRM) is the Microsoft implementation of WS-Management Protocol.  In many key items within the latest offerings from Microsoft management, included most obviously for me, PowerShell, it is the under pinning of many of the remote management operations. The idea is a good one.  Align with a standard in your latest technologies methods used to manage […]

, ,

Execute PowerShell from a ASP.NET Web Application

I had an interesting request come in to automate existing server-side PowerShell processes that have been initiated by server admins thus far locally on the server, using a web interface instead.  Turns out, the admins want to offload the work back to the business users so it can be more on demand. Essentially, they want the […]

“Unable to load one or more of the requested types.”

This annoying exception greeted me this morning… Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Reflection.ReflectionTypeLoadException: Unable to load […]

, ,

Automated PICS-Label Generation Using PowerShell for IIS 7

Need the correct PICS-Label HTTP response headers for 0 ratings added to your Default Web Site in IIS 7 using PowerShell?  This post has you covered. This is for that age old “Content Advisor” requirement in IE feature for me.  It is a feature of some browsers, primarily Internet Explorer, that enable end users to safeguard children from […]