PowerShell PSCustomObject - Custom Object, the way it was meant to be

Everything is an object in PowerShell, and ability to create own object allows for one more way of controlling and handling data. In this video I’ll take you through the steps of creating PSCustomObject, working with its properties to doing more advanced topics - like adding methods and types to the object. <#PSScriptInfo .VERSION 1.0.0 .GUID f5228c81-d25c-4984-bb0c-e64576487b3e .AUTHOR Kamil Procyszyn .COPYRIGHT Kamil Procyszyn .PROJECTURI https://github.com/kprocyszyn/About-PowerShell .RELEASENOTES 2021 November .DESCRIPTION Link to the video: https://youtu....

2 November 2021 · 3 min · 620 words · Kamil

PowerShell for IT Professionals [#15] – Scripting part 2 – IF and psobject

In this lesson we carry on writing the scripting by gathering requirements and putting them together as comments in code. Then we will retrieve OS information with the help of WMI and display it on the screen with Write-Host. Although using Write-Host is easy to use, it doesn’t really allow us to do very much e.g. we cannot export information to the CSV, therefore we change it and start using custom PSObject – that way our script will start returning information like a regular PowerShell command....

5 October 2020 · 1 min · 206 words · Kamil