PowerTip: Get Unique Numbers from Array

Summary: Learn how to get unique numbers from an array.  How can I use Windows PowerShell to return only the numbers that are unique in an array?  Sort the array of numbers, then pipe the output to the Get-Unique cmdlet, for example: $a = 1,2,7,6,4,3,3,2,9 $a | sort | Get-Unique Note  Sort is an alias for the Sort-Object cmdlet.


Use PowerShell to Parse Network Trace Logs

Summary: Ed Wilson, Microsoft Scripting Guy, talks about using Windows PowerShell to analyze packet trace logs. Microsoft Scripting Guy, Ed Wilson, is here. Today I want to finish my discussion about analyzing a network trace log that was captured by using the cmdlets from the NetEventPacketCapture module.    Note  For more information about setting up…


PowerTip: Sort an Array of Numbers with PowerShell

Summary: Learn how to sort an array of numbers with Windows PowerShell.  How can I use Windows PowerShell to easily sort an array of numbers?  Pipe the array to the Sort-Object (sort is an alias) cmdlet, for example: $a = 1,2,7,6,4,3,3,2,9 $a | sort


Packet Sniffing with PowerShell: Looking at Messages

Summary: Microsoft Scripting Guy Ed Wilson talks about looking at the message field in a packet log with Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. Yesterday I begin analyzing a packet trace log. Note  For more information about setting up and making a packet trace, see Packet Sniffing with PowerShell: Getting Started. For…


Use PowerShell to Parse Network Log

Summary: Ed Wilson, Microsoft Scripting Guy, talks about using Windows PowerShell to parse a network trace log. Microsoft Scripting Guy, Ed Wilson, is here. Today I want to talk a little bit about using Windows PowerShell to parse a network trace log. In yesterday’s blog post, Packet Sniffing with PowerShell: Getting Started, I talked using…


PowerTip: Send Message to Information Stream in PowerShell

Summary: Use Windows PowerShell to send information for a command to a separate information stream.  How can I use Windows PowerShell to send information to a user via a separate information stream,            without changing the default information preference variable?  In Windows PowerShell 5.0, use the new Write-Information cmdlet, for example: gps ;…


PowerTip: Display Every PowerShell Example in Help

Summary: Display every Windows PowerShell example that Help contains.  How can I use Windows PowerShell to display every Help example that Windows PowerShell contains?  Use Get-Command to retrieve all of the cmdlet names, pipe the output to Foreach-Object,            and call Get-Help with the –Example switch, for example: gcm | % {get-help $_.name -ex} Note  GCM is an alias for Get-Command and % is…


Packet Sniffing with PowerShell: Getting Started

Summary: Ed Wilson, Microsoft Scripting Guy, talks about getting started with packet sniffing in Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. One of the way cool things that happened with Windows 8.1 and Windows Server 2012 R2 was the ability to do network traces with Windows PowerShell. I have found network tracing extremely useful and helpful…


PowerTip: Find Windows Capabilities with PowerShell

Summary: Find Windows capabilities with Windows PowerShell on Windows 10.  How can I use Windows PowerShell 5.0 on Windows 10 to determine capabilities such as handwriting,            optical character recognition (OCR), speech, and text-to-speech on my installation?  Use the Get-WindowsCapability cmdlet, specify the -Online parameter, and filter for a state of Installed,          …


Playing with JSON and PowerShell—The Video

Summary: Ed Wilson, Microsoft Scripting Guy, presents a video where he describes converting JSON data with Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. Today I present a video where I talk about using the ConvertFrom-JSON cmdlet to parse information returned via Invoke-WebRequest. I am using Windows PowerShell 5.0 on Windows 10 to illustrate…