Showing archive results for 2014

Sep 24, 2014
Post comments count0
Post likes count0

PowerTip: Use PowerShell and Graphical Tool to View Files

Doctor Scripto

Summary: Use Windows PowerShell and a graphical tool to view large files.  How can I use Windows PowerShell to easily see what files in a folder are the largest so I can clean up my file system?   Use the Get-ChildItem cmdlet to return the contents of a folder, select the name and length of the files, then     &nb...

Scripting Guy!Windows PowerShellPowerTip
Sep 24, 2014
Post comments count0
Post likes count0

Use Select-String Cmdlet in PowerShell to View Contents of Log File

Doctor Scripto

Summary: Use the Windows PowerShell cmdlet, Select-String, to view the contents of a log file.  Hey, Scripting Guy! I have a log file that I created by dumping process information from Get-Process. It is quite long, and I am trying to use Select-String to find the number of instances of a certain process. The problem is that when I find the in...

Scripting Guy!Windows PowerShellscripting techniques
Sep 23, 2014
Post comments count0
Post likes count1

PowerTip: Read First Line of File with PowerShell

Doctor Scripto

Summary: Learn how to read only the first line of a file by using Windows PowerShell.  How can I use Windows PowerShell to read only the first line of a file?  Introduced in Windows PowerShell 3.0, you can use the -First parameter, for example: Get-Content C:\fso\batteryReport.txt -First 1

Scripting Guy!PowerTipPowerShell
Sep 23, 2014
Post comments count0
Post likes count0

Fun Formatting Ones—Part 2: The Method

Doctor Scripto

Summary: June Blender explains Doug Finke's multiplication and formatting trick. Today...the method. Microsoft Scripting Guy, Ed Wilson, is here. This is the second part of a two-part series written by June Blender, Honorary Scripting Guy. In the first part, Fun Formatting Ones—Part 1: The Task, we discussed the task of printing Doug's multip...

Scripting Guy!Windows PowerShellscripting techniques
Sep 22, 2014
Post comments count0
Post likes count0

PowerTip: Display Hidden Properties from Object

Doctor Scripto

Summary: Learn how to use Windows PowerShell to display hidden properties from an object.  How can I see if there are any hidden properties on an object I have returned from Windows PowerShell?  Use the -Force parameter with either Format-List or Format-Table, for example: Get-ChildItem C: | Format-List * -Force &...

Scripting Guy!Windows PowerShellPowerTip