Showing results for text files - Scripting Blog [archived]

Jan 20, 2016
0
0

PowerTip: Use PowerShell to return first two lines of file

Doctor Scripto
Doctor Scripto

Summary: Learn how to use Windows PowerShell to return the first two lines of a text file. How can I use Windows PowerShell to easily return the first two lines of a text file? Use the Get-Content cmdlet and specify the TotalCount parameter. In this example, TotalCount is set         ...

Scripting Guy!Windows PowerShellscripting techniques
Feb 24, 2013
0
0

Weekend Scripter: Two Way-Cool PowerShell Text File Tricks: Tail and Wait

Doctor Scripto
Doctor Scripto

Summary: Microsoft Scripting Guy, Ed Wilson, talks about two way-cool new Windows PowerShell parameters: Tail and Wait. Microsoft Scripting Guy, Ed Wilson, is here. Some things in Windows PowerShell are just so cool that I get all carried away with them and lose focus on whatever I am supposed to be doing. It happens that way sometimes. Luckily, it...

Scripting Guy!Windows PowerShellscripting techniques
Feb 23, 2013
0
0

Weekend Scripter: Creating a Sample Log File by Using PowerShell

Doctor Scripto
Doctor Scripto

Summary: Microsoft Scripting Guy, Ed Wilson, shows how to create sample textual log output by using Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. Well, it is the weekend. It seems like it has been a rather long week, but I guess in reality it was no longer than any other week. I did get a cool book that finally showed up by the p...

Scripting Guy!Windows PowerShellscripting techniques
Nov 3, 2011
0
0

Search for and Replace Words in a CSV File by Using PowerShell

Doctor Scripto
Doctor Scripto

Summary: Learn how to search for and replace words in a CSV file by using Windows PowerShell.   Hey, Scripting Guy! I have a comma-separated value (CSV) file that contains user names, user groups, and organizational unit (OU) assignments. The problem is that we are moving one of our office locations, and I need to quickly change the old locati...

Scripting Guy!Windows PowerShellscripting techniques
Aug 5, 2011
0
0

Use PowerShell to Open Files That Contain Matching Words

Doctor Scripto
Doctor Scripto

Summary: Learn how to use Windows PowerShell to search a folder for matching strings and to open them automatically in Notepad.   Hey, Scripting Guy! I have been enjoying using the Select-String cmdlet, but I have a question. When I use Select-String, it lists the file that it finds the match in, but I have to copy and paste from there in orde...

Scripting Guy!Windows PowerShellscripting techniques