Master-PowerShell | With Dr. Tobias Weltner

  • Chapter 1. The PowerShell Console

    Welcome to PowerShell! This chapter will introduce you to the PowerShell console and show you how to configure it, including font colors and sizes, editing and display options. Topics Covered: Starting PowerShell First Steps with the Console Incomplete
  • Chapter 2. Interactive PowerShell

    PowerShell has two faces: interactivity and script automation. In this chapter, you will first learn how to work with PowerShell interactively. Then, we will take a look at PowerShell scripts. Topics Covered: PowerShell as a Calculator Calculating with
  • Chapter 3. Variables

    It is time to combine commands whenever a single PowerShell command can't solve your problem. One way of doing this is by using variables. PowerShell can store results of one command in a variable and then pass the variable to another command. In
  • Chapter 4. Arrays and Hashtables

    Whenever a command returns more than one result, PowerShell will automatically wrap the results into an array. So dealing with arrays is important in PowerShell. In this chapter, you will learn how arrays work. We will cover simple arrays and also so
  • Chapter 5. The PowerShell Pipeline

    The PowerShell pipeline chains together a number of commands similar to a production assembly. So, one command hands over its result to the next, and at the end, you receive the result. Topics Covered: Using the PowerShell Pipeline Object-oriented Pipeline
  • Chapter 6. Working with Objects

    In this chapter, you will learn what objects are and how to get your hands on PowerShell objects before they get converted to simple text. Topics Covered: Objects = Properties + Methods Creating a New Object Adding Properties Adding Methods Properties
  • Chapter 7. Conditions

    Conditions are what you need to make scripts clever. Conditions can evaluate a situation and then take appropriate action. There are a number of condition constructs in the PowerShell language which that we will look at in this chapter. In the second
  • Chapter 8. Loops

    Loops repeat PowerShell code and are the heart of automation. In this chapter, you will learn the PowerShell loop constructs. Topics Covered: ForEach-Object Invoking Methods Foreach Do and While Continuation and Abort Conditions Using Variables as Continuation
  • Chapter 9. Functions

    Functions work pretty much like macros. As such, you can attach a script block to a name to create your own new commands. Functions provide the interface between your code and the user. They can define parameters, parameter types, and even provide help
  • Chapter 10. Scripts

    PowerShell can be used interactively and in batch mode. All the code that you entered and tested interactively can also be stored in a script file. When you run the script file, the code inside is executed from top to bottom, pretty much like if you had
  • Chapter 11. Error Handling

    When you design a PowerShell script, there may be situations where you cannot eliminate all possible runtime errors. If your script maps network drives, there could be a situation where no more drive letters are available, and when your script performs
  • Chapter 12. Managing Scope

    Anything you define in PowerShell - variables, functions, or settings - have a certain life span. Eventually, they expire and are automatically removed from memory. This chapter talks about "scope" and how you manage the life span of objects
  • Chapter 13. Text and Regular Expressions

    Often, you need to deal with plain text information. You may want to read the content from some text file and extract lines that contain a keyword, or you would like to isolate the file name from a file path. So while the object-oriented approach of PowerShell
  • Chapter 14. XML

    In today’s world, data is no longer presented in plain-text files. Instead, XML (Extensible Markup Language) has evolved to become a de facto standard because it allows data to be stored in a flexible yet standard way. PowerShell takes this into
  • Chapter 15. Working with the File System

    Working with files and folders is traditionally one of the most popular areas for administrators. PowerShell eases transition from classic shell commands with the help of a set of predefined "historic" aliases and functions. So, if you are comfortable
  • Chapter 16. Managing Windows Registry

    Thanks to PowerShells universal "Provider" concept, you can navigate the Windows Registry just as you would the file system. In this chapter, you will learn how to read and write Registry keys and Registry values. Using Providers Available Providers
  • Chapter 17. Processes, Services, and Event Logs

    In your daily work as an administrator, you will probably often deal with applications (processes), services, and event logs so let's take some of the knowledge you gained from the previous chapters and play with it. The examples and topics covered
  • Chapter 18. WMI: Windows Management Instrumentation

    Windows Management Instrumentation (WMI) is a technique available on all Windows systems starting with Windows 2000. WMI can provide you with a wealth of information about the Windows configuration and setup. It works both locally and remotely, and PowerShell
  • Chapter 19. User Management

    User administration in the Active Directory was a dark spot in PowerShell Version 1. Microsoft did not ship any cmdlets to manage AD user accounts or other aspects in Active Directory. That's why the 3rd party vendor Quest stepped in and published
  • Chapter 20. Loading .NET Libraries and Compiling Code

    Since PowerShell is layered on the .NET Framework, you already know from Chapter 6 how you can use .NET code in PowerShell to make up for missing functions. In this chapter, we’ll take up this idea once again. You’ll learn about the options
Copyright 2012 All rights reserved.