Richard Siddaway's Blog

PowerShell is .NET based but doesn’t load all available .NET assemblies when it starts.

Many people still use something like


to load additional assemblies. This is a hang over from PowerShell v1 when there wasn’t another way to perform the load.

The LoadWithPartialName method has been deprecated – – and shouldn’t be used.

Your alternatives are:

Add-Type -AssemblyName System.Windows.Forms

or in PowerShell v5

using assembly System.Windows.Forms

using namespace System.Windows.Forms

can be used

View original post

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s