PowerShell Classes Part 5 — Classes or PSCustom Objects?

Custom PowerShell objects are one way to represent a set of data as a single object and so are PowerShell classes. In this article, take a look at some of the similarities and differences between the two object structures so that you can best define custom objects for your needs.

The post PowerShell Classes Part 5 — Classes or PSCustom Objects? appeared first on Petri.

Continue reading PowerShell Classes Part 5 — Classes or PSCustom Objects?

PowerShell Classes Part 4 — Constructors and Inheritance

Take your PowerShell class programming to the next level! Define constructors to simplify the creation of the classes, and use inheritance to create a hierarchy of classes and subclasses that inherit properties and methods.

The post PowerShell Classes Part 4 — Constructors and Inheritance appeared first on Petri.

Continue reading PowerShell Classes Part 4 — Constructors and Inheritance

Avoiding Accidental Changes with PowerShell’s WhatIf and Confirm Parameters

Learn how to prevent PowerShell mistakes by adding -whatif and -confirm parameters.

The post Avoiding Accidental Changes with PowerShell’s WhatIf and Confirm Parameters appeared first on Petri.

Continue reading Avoiding Accidental Changes with PowerShell’s WhatIf and Confirm Parameters

Anatomy of a PowerShell Advanced Function

PowerShell advanced functions provide modularity in automating system administration tasks and by structuring PowerShell scripts as advanced functions, you can transform your scripts and functions into reusable tools.

The post Anatomy of a PowerShell Advanced Function appeared first on Petri.

Continue reading Anatomy of a PowerShell Advanced Function