Sunday, January 27, 2013

Powershell is a fun tool. Here is a one line command to select a random line out of a text file. Assuming you have a text file with the file name of "names.txt" the following command will pull one line out of the file at random.

Get-Content names.txt | Get-Random

No comments: