Skip to main content

Posts

Showing posts from May, 2018

Powershell arsenal to get you started

Here is my list of helpful information to you get started in PowerShell to ultimately automate your entire infrastructure.

BeginnerPowerShell In A Month Of Lunches: 
https://www.amazon.com/Learn-Windows-PowerShell-Month-Lunches/dp/1617294160/ref=sr_1_1?ie=UTF8&qid=1526748652&sr=8-1&keywords=powershell+in+a+month+of+lunches

PowerShell 4Noobs:
https://leanpub.com/powershell-4n00bs

Getting Start With PowerShell. Free from Microsoft Virtual Academy:
https://mva.microsoft.com/en-us/training-courses/getting-started-with-microsoft-powershell-8276

Windows Server Administration Fundamentals Using PowerShell:
https://www.pluralsight.com/courses/windows-server-administration-fundamentals-using-powershell

IntermediatePowerShell Scripting In A Month Of Lunches:
https://www.amazon.com/Learn-PowerShell-Scripting-Month-Lunches/dp/1617295094/ref=sr_1_3?s=books&ie=UTF8&qid=1526748802&sr=1-3&keywords=powershell+scripting

Mastering Windows PowerShell Scripting:
https://www.amazon.…

[string]$My_New_Journey = 'Learning the back end of PowerShell' classes and methods

So, what will my first write-up be about? Learning the back-end of PowerShell. PowerShell calls on the .NET framework and allows you to access .NET API's. It also allows to to call in "classes". These classes hold valuable information of different types, methods, and how you interact with certain aspects of PowerShell. It's one thing to be able to use these classes (blueprints) and methods (actions). It's another to be able to CREATE them. With that, since PowerShell accesses a ton of C#, let's jump into C# (Please Note: I'm a total C# noob).

First, you start off with your application. I chose a standard console application.


On the top, you see "using". What is "using"? Using allows you to import certain libraries of the .NET framework in C#. What are libraries? In short, libraries hold a ton of classes. Those classes contain the methods that you will be calling. Often, folks call classes the "blueprint". So think of librarie…