Using PowerShell to read large logfiles

Sometimes logfiles can become very large and difficult to open. If you only need to see the end of the logfile, for instance the last 100 lines, then you can use PowerShell to show just these lines. In this example you can view the last 100 lines of the very large logfile called C:\Log\VeryLargeLogFile.log.

Extract icon from executable with PowerShell

PowerShell can be used to extract icons from executables. Here you’ll find a script that extracts the icons from all the executables in a given directory. In this example the script is saved as Get-Icon.ps1.

Add Windows firewall rules via PowerShell

You can use PowerShell to add rules to the Windows firewall. Here you can see an example of adding firewall rules for the application called Lego Mindstorms. This script allows all incoming UDP and TCP traffic to be sent to the executable MindstormsEV3.exe.