#20 PowerShell Learning: Getting WMI objects with Get-CimInstance

Ftr38

Windows Management Instrumentation (WMI) is a core technology for Windows system administration because it exposes a wide range of information in a uniform manner. Because of how much WMI makes possible, the PowerShell cmdlet for accessing WMI objects, Get-CimInstance, is one of the most useful for doing real work. We’re going to discuss how to use the CIM cmdlets to access WMI objects and then how to use WMI objects to do specific things.

#16 PowerShell Learning: One-liners and the Pipeline

Ftr38

When I first started learning PowerShell, if I couldn’t accomplish a task with a PowerShell one-liner, I went back to the GUI. Over time, I built my skills up to writing scripts, functions, and modules. Don’t allow yourself to become overwhelmed by some of the more advanced examples you may see on the internet. No one is a natural expert with PowerShell. We were all beginners at one time.

#15 PowerShell Learning: PowerShell Functions

Ftr38

A function is basically a named block of code. When you call the function name, the script block within that function runs. It is a list of PowerShell statements that has a name that you assign. When you run a function, you type the function name.It is a method of saving time when tackling repetitive tasks. PowerShell formats in three parts: the keyword ‘Function’, followed by a Name, finally, the payload containing the script block, which is enclosed by curly/parenthesis style bracket.

#13 PowerShell Learning: PowerShell Loops

Ftr38

Each programming language or scripting language has several different methods of applying the loop. Looping is a basic programming process that allows us to repeat a command and process large amounts of data. Without this ability, writing scripts would be tedious and almost impossible.