Category Archives: PowerShell v2.0

Using Types with Imported CSV Data in PowerShell

The Import-CSV cmdlet in PowerShell is incredibly useful. You can take any CSV file and pump objects to the pipeline. The cmdlet uses the CSV header as properties for the custom object. PS S:\> import-csv .\testdata.csv Date    : 1/18/2012 … Continue reading

Posted in PowerShell v2.0, Scripting | Tagged , , , , , | 2 Comments

Friday Fun: Output to 2 Places in 1

Today’s Friday Fun comes out of a short exchange I had yesterday with Hal Rottenberg on Google Plus. We were playing around with piping a PowerShell command to Clip.exe which dumps the output to the Windows Clipboard. I got to … Continue reading

Posted in Friday Fun, PowerShell v2.0 | Tagged , , , , | Leave a comment

Convert Text to Object Updated

I’ve had a few comments and emails lately about my post and script on converting text to objects. I decided the function needed a little more lovin’ so today I have an updated version, complete with comment based help. Function … Continue reading

Posted in CommandLine, PowerShell, PowerShell v2.0, Scripting | Tagged , , , | 3 Comments

Using Start-Job as a Scheduled Task

Here’s a technique you might want to use for ad hoc troubleshooting or reporting. Even though it is possible to set up scheduled tasks to run PowerShell commands or scripts, it is cumbersome and time consuming. PowerShell v3 offers a … Continue reading

Posted in PowerShell v2.0, Scripting | Tagged , , , , | 1 Comment

Friday Fun – A PowerShell Console Menu

When working in PowerShell, and especially when scripting, you might want to give the user a choice of actions. For example, you might develop a configuration script that another admin or technician will run. Perhaps one of the steps is … Continue reading

Posted in Friday Fun, PowerShell v2.0, Scripting | Tagged , , , | 10 Comments