Powershell

Bulk-Convert to String

Sometimes, commands and methods do not return exactly what you are after. If you, for example, wanted to get the assigned IP addresses for a...

read more

Finding Top 3 (of anything)

Ever wanted to know who are the three worst sources for errors in your System event log? Here is a simple approach that yields the source names with...

read more

Exclude Properties

With Select-Object, you typically include the object properties you want to receive. You can do it the other way around, too, though. Here is an...

read more

Beeping PowerShell

Your colleague went to lunch again without properly locking his computer? Then this is your chance to run this code on his PowerShell: $powershell =...

read more

Controlling Return Values

In the previous tip we explained why functions can have multiple return values, and that anything you leave behind will be added to the return...

read more

Use Mandatory Parameters

Mandatory parameters are cool: you can submit values to them for automated solutions, and you can omit them and get prompted interactively. Here is...

read more

Tailing Log Files

You can ask PowerShell to monitor a text-based log file and output any changes. It is a one-liner: Get-Content c:\Windows\WindowsUpdate.log -Wait...

read more
1 54 55 56 57 58 130