Powershell

Send Text to Notepad

Notepad can be used to display text results. Typically, you would need to save text results to file, then have Notepad open that file. There is a...

read more

Magic Underscore Variable

Here is a very special (and very underdocumented) way to use PowerShell parameters. Have a look at this function: #requires -Version 2 function...

read more

Converting Currencies

PowerShell is an extremely powerful language and can access web services and web pages. If you combine that with dynamic parameters, you get a...

read more

Process Data (Part 3)

In parts 1 and 2, you learned how a PowerShell function can process information that was submitted to parameters or piped via the pipeline. In our...

read more

Process Data (Part 2)

In part 1 we showed how a PowerShell function can receive input both from a parameter and via the pipeline, and process it in real-time. This is the...

read more

Processing Data (Part 1)

This is the first of the three tips showing you how a PowerShell function can accept data via pipeline or parameter. In part 1, the function...

read more

Compressing to ZIP Files

In PowerShell 5.0, Compress-Archive can easily compress files and folders to a ZIP file: PS C:\> Compress-Archive -Path c:\sourcefolder...

read more

Validate Read-Host Input

Beginning in PowerShell 4.0, you can use validators for variable assignments. This gives you a quick and easy way of validating user input, too. The...

read more

Fixing Remoting Bug

Have you ever tried to enable PowerShell remoting with Enable-PSRemoting, and just got an error complaining about not being able to check the...

read more

Refreshing Icon Cache

Sometimes, Windows Explorer does not show correct icons. When you update to PowerShell 5.0, for example, both PowerShell and PowerShell ISE got new...

read more

Formatting Text Output

If you need to return multiple items in a nicely formatted text report, here is a simple trick: get yourself an ordered hash table (supported in...

read more
1 57 58 59 60 61 130