19 September 2016

Powershell Power Boost

If you're new to Powershell or if you've been around the block a few times but have no background in C#, then you may benefit from the advantages of using C#.NET's List classes.  The class is fully documented here:

https://msdn.microsoft.com/en-us/library/6sh2ey19

Take a look.  There are multiple pre-built methods that come in very handy with Powershell scripts.  Some of my favorites are Count(), Contains(T), Reverse(), Sort() and many more.

Leveraging lists is easy once you've defined them in Powershell thusly:

$list = New-Object -TypeName System.Collections.Generic.List[String];

So go ahead and give List a try in your scripts... you'll never use arrays again!

Later
C

Microsoft Authentication Library (MSAL) Overview

The Microsoft Authentication Library (MSAL) is a powerful library designed to simplify the authentication process for applications that conn...