How to skip the beginning and ending of a file by using PowerShell

Summary: Learn how to skip the beginning and ending portions of a text file by using Windows PowerShell in this article by the Microsoft Scripting Guy Ed Wilson. This is the second post in a multi-part series of blog posts that deal with how to determine letter frequency in text files. To fully understand this…

1

Use PowerShell 5.0 to create temporary files in the temp folder

Summary: Microsoft Scripting Guy Ed Wilson talks about using Windows PowerShell 5.0 on Windows 10 to create temporary files in the temporary folder.   Sometimes it is the little things that make life easier. You know, like a cereal bar … it’s not like a major technological breakthrough but it is much more convenient than…

0

PowerTip: Display Hidden Files in PowerShell

Summary: Boe Prox shows how to use Windows PowerShell to display hidden files.  How can I use Windows PowerShell to display hidden files and folders? There are a couple of approaches that use Get-ChildItem: Get-ChildItem –Hidden Get-ChildItem –Attributes H


Weekend Scripter: Search and Filter Directory Lists with PowerShell

Summary: Ed Wilson, Microsoft Scripting Guy, talks about using Windows PowerShell to sort, search, and to filter through a directory list. Microsoft Scripting Guy, Ed Wilson, is here. One of my friends on Facebook posted a picture of a bunch of hardwood trees all decked out in fall colors. It was rather pretty. That is…


PowerTip: Recurse Specific Number of Levels with PowerShell 5

Summary: Learn how to recurse a specific number of levels in a directory with Windows PowerShell 5.0.  How can I recurse only three levels into a deeply nested directory structure?  In Windows PowerShell 5.0, the Get-ChildItem cmdlet has a new –Depth parameter            that will control how deeply to recurse, for example: Get-childitem c:\fso –recurse…


Weekend Scripter: Compressed Archives—The Video

Summary: Ed Wilson, Microsoft Scripting Guy, created a video to illustrate using Windows PowerShell 5.0 to create compressed archives. Microsoft Scripting Guy, Ed Wilson, is here. The sky is a deep blue, and the early morning haze on the horizon hides the fluffy white clouds causing them to blend into the sky like a brush stroke…


PowerTip: Use PowerShell 5 to Compress Files

Summary: Learn how to use the new Compress-Archive cmdlet to compress selected files in Windows PowerShell 5.0.  How can I compress a bunch of files on my computer that match a pattern I supply to Get-ChildItem?  Use Get-ChildItem to find the files you want to compress, and pipe the results to the Compress-Archive cmdlet,            for example (gci is…


Working with Compressed Files in PowerShell 5

Summary: Ed Wilson, Microsoft Scripting Guy, talks about the new compressed file cmdlets in Windows PowerShell 5.0 on Windows 10. Microsoft Scripting Guy, Ed Wilson, is here. It finally happened. I ran out of Gunpowder Green tea over the weekend. I have been making lots of Gunpowder Green tea with hibiscus flowers, rose hips, lemon…


New Feature in PowerShell 5: Compress Files

Summary: Ed Wilson, Microsoft Scripting Guy, talks about the compressing files feature in Windows PowerShell 5.0. Microsoft Scripting Guy, Ed Wilson, is here. This morning, the sun is shining, the air is dead calm, and I am sitting outside under a gigantic old oak tree with my Windows Surface Pro 3 that I upgraded to Windows…


PowerTip: Use PowerShell to Add Content to File

Summary: Learn how to use Windows PowerShell to add content to a file.  How can I use Windows PowerShell to add content to a file?  Use the Add-Content cmdlet, and specify the path to the file and the value of the content, for example: Add-Content C:\fso\AnEmptyFile.txt -Value "This is content"