Powershell

Comparing String Lists

In a previous example we used HashSets to compare numeric lists, and find out which elements were found in both list, or in just one list. The same...

read more

Comparing Numeric Lists

Often a script needs to find out whether two lists are the same, or which elements are missing from a list. Instead of investing much programming...

read more

Tagging Objects Efficiently

Occasionally you see scripts that use Select-Object to append information to existing objects. This can look similar to the code below: Get-Process...

read more

Minimalistic Error Handling

Error handling does not necessarily have to be complex. It can be as simple as checking whether the last command executed successfully: # suppress...

read more

Script Logging Made Easy

Beginning in PowerShell 5, you can use Start-Transcript in any host to log all the output created by your script. Here is how you can easily add...

read more
1 37 38 39 40 41 130