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: Use PowerShell to dismount a disk image

Summary:  Learn how to use Windows PowerShell to dismount a virtual disk or ISO.  How can I use Windows PowerShell to dismount a virtual disk?  Use the Dismount-DiskImage cmdlet. It will dismount either an ISO or a virtual hard disk. Specify the path then using -imagepath. Here is an example: Dismount-DiskImage -imagepath “C:\fso\myisodisk.iso”


PowerTip: Flush file system cache by using PowerShell

Summary: Use Windows PowerShell to forcibly write the file system cache to a drive.  How can I use Windows PowerShell to forcibly flush the volume cache by writing it to a drive?  Use the Write-VolumeCache cmdlet and specify the drive letter, for example: Write-VolumeCache c Note  There is no colon following the drive letter.


PowerTip: Use PowerShell to format drive

Summary: Learn how to use Windows PowerShell to quickly format a drive.  How can I use Windows PowerShell to quickly format a drive?  Use the Format-Volume cmdlet and specify the drive letter, for example: Format-Volume -DriveLetter D


PowerTip: Get File System errors on NTFS Volumes with PowerShell

Summary: Use Windows PowerShell to get file system errors on all NTFS volumes.  How can I use Windows PowerShell to check your NTFS volumes for file system errors?  On Windows 10 with Windows PowerShell 5.0, use the Get-Volume cmdlet to retrieve all volumes and           pipe the output to the Get-VolumeCorruptionCount cmdlet, for example: Get-Volume |…


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…


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…