Powershell Core 6.2 Cookbook
上QQ阅读APP看书,第一时间看更新

Creating classes

To create your own classes in PowerShell, you have two options. You can use either .NET with C# to create your class, or you can use the PowerShell class language element.

Both have their pros and cons, which we will see in the following recipe.