Using Windows PowerShell as an IT Pro – Part 1
There is a lot of Windows PowerShell info out there but I wanted to write about how to learn PowerShell without having a strong coding background. Windows PowerShell 1.0 came and I started to dabble. Then I started using it for very specific functions\tasks and learned just enough to do what I needed. Obviously I developed many gaps in my basic PowerShell knowledge and I have been trying to close those gaps ever since.What I want to do with these blog posts is to help someone who has none or very little coding experience to learn the basics of Windows PowerShell so that they can utilize in their own environment. I don’t know everything about PowerShell but I do have some knowledge that I feel I can pass along for beginners.
If you don’t know what Windows PowerShell is then go here first Windows PowerShell. This will give you an introduction to what it is and if you start to dig you will find a lot of other information as well.
I will start with two things you should also know about PowerShell:
- PowerShell commands uses and processes objects instead of just text. What does this mean? It means that when you deal with data (PowerShell leverages the .NET object model. .NET is a unifying object representation that is being used across all of Microsoft.) the data has associated properties, which are like characteristics, and methods, which are actions that you can perform on the object. The properties could tell you things like the current status of the object and the methods could allow you to perform actions on the object such as to stop it.
- Windows PowerShell uses a “verb-noun” naming system, where each cmdlet name consists of a standard verb hyphenated with a specific noun. The verbs express specific actions in Windows PowerShell such as Get, Set, Stop, etc. The nouns basically tell you want kind of object it is designed for such as Service, Process, etc. Combine those two parts and you have your cmdlet: Get-Service, Stop-Process, etc.

In my next Post we will look at how to get help and other useful commands.
No comments:
Post a Comment