PowerShell for IT Professionals [#16] – Scripting part 3 – Add-Member and network

In this lesson we are taking our script further by adding details about IP configuration and last installed hotfixes. But it turns out, the networking information is not that shallow as it seems at the first glance – thus I’ll show you how to retrieve the information from the configuration. We will also look on how to reuse our already created object so that we don’t need to duplicate code....

13 October 2020 · 2 min · 280 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