Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Latest posts

Feb 24, 2016
Post comments count 0
Post likes count 0

PowerTip: Find DSC resources with PowerShell

Doctor Scripto

Summary: Learn how to find DSC resources with Windows PowerShell.  How can I use Windows PowerShell to find DSC resources that are available in the PowerShell Gallery?  Use the Find-DSCResource command.  

Feb 23, 2016
Post comments count 0
Post likes count 0

Overview of the PowerShellGet module to find scripts

Doctor Scripto

Summary: In this blog post, I provide a quick overview of the PowerShellGet module and its various commands. Believe it or not, the Windows PowerShell Saturday event in Tampa, Florida is coming up pretty quickly. There are still some tickets available, but they have been going pretty quickly lately. There are some awesome speakers coming to Tampa for this event and I am looking forward to seeing all of them. Something really cool is that Ashley McGlone is coming from Columbus, Ohio for the event. I was his mentor for a couple of years, and it is really great to see how successful he has become. In fact, we are g...

Feb 22, 2016
Post comments count 0
Post likes count 1

PowerTip: Find PowerShell modules that are installed by PowerShell Get command

Doctor Scripto

Summary: Learn how to find modules that were installed by the Windows PowerShell Get command.  How can I use Windows PowerShell to find modules that have been installed by the Get command?  Use the Get-InstalledModule command.

Feb 22, 2016
Post comments count 0
Post likes count 0

PowerShell Spotlight: February 2016

Doctor Scripto

Summary: Microsoft MVP, Teresa Wilson, talks about Windows PowerShell Saturday in this month’s PowerShell Spotlight. Hello scripters, I hope everyone had a marvelous weekend and is planning on an awesome week. I have been working on some of the last of the preparations for PowerShell Saturday #010 coming up in less than a month (March 19) in Tampa, FL. There are still seats available, so you have time to register. As a special favor to me, if you plan to attend, the quicker you sign up, the faster I know how many are attending and I can order the correct amount of food. Here’s a little background (in case you ...

Feb 21, 2016
Post comments count 0
Post likes count 0

PowerTip: Add Hyper-V network switch to network packet capture session

Doctor Scripto

Summary: Learn how to add a Hyper-V virtual switch as a filter for a remote packet capture session.  How can I use Windows PowerShell to add a Hyper-V Virtual switch as a provider for a remote packet capture session?  Use the Add-NetEventVmSwitch cmdlet and specify the name of the switch. In the following commands, I create a new event session, specify a packet capture provider, and then add the Hyper-V switch: PS C:\>New-NetEventSession -Name "NESession01" PS C:\> Add-NetEventPacketCaptureProvider -SessionName "NESession01" PS C:\> Add-NetEventVMSwitch -Name "Network Adapter 2 - Virtual Switch"  

Feb 21, 2016
Post comments count 0
Post likes count 0

PowerTip: Add virtual network adapter to packet capture session

Doctor Scripto

Summary: Learn how to use Windows PowerShell to add a virtual network adapter to a network packet capture session.  How can I use Windows PowerShell to add a virtual network adapter to a network packet capture session?  Use the Add-NetEventVmNetworkAdapter cmdlet and specify the name of the adapter. In the following example, I create a net event session, add a capture provider, and then specify the virtual network adapter: PS C:\>New-NetEventSession -Name "NESession01" PS C:\> Add-NetEventPacketCaptureProvider -SessionName "NESession01" PS C:\> Add-NetEventVMNetworkAdapter -Name "LargeGuid"

Feb 20, 2016
Post comments count 0
Post likes count 0

PowerTip: Use PowerShell to add ETW provider to a session

Doctor Scripto

Summary: Use Windows PowerShell to add an ETW provider to a session.  How can I use Windows PowerShell to add an ETW provider to a session?  Use the Add-NetEventProvider cmdlet and specify the name of the session and the provider. In the following example, first a net event session is created, and then the TCPIP ETW provider is added to the session: PS C:\>New-NetEventSession -SessionName "Session01" PS C:\> Add-NetEventProvider -Name "Microsoft-Windows-TCPIP" -SessionName  "Session01"

Feb 20, 2016
Post comments count 0
Post likes count 0

PowerTip: Add network adapter to packet capture session

Doctor Scripto

Summary: Learn to use Windows PowerShell to add a network adapter to a capture session.  How can I use Windows PowerShell to add a network adapter to a packet capture session? Use the Add-NetEventNetworkAdapter cmdlet and specify the name of the adapter. In the following example, I create a network capture session, add a provider, and then add the network adapter: PS C:\>New-NetEventSession -Name "Session38" PS C:\> Add-NetEventPacketCaptureProvider -SessionName "Session38" PS C:\> Add-NetEventNetworkAdapter -Name "Ethernet01"

Feb 19, 2016
Post comments count 0
Post likes count 0

PowerTip: Set ErrorActionPreference to original value

Doctor Scripto

Summary: Cloud & Datacenter Management MVP, Thomas Rayner, shows how to work with the ErrorActionPreference variable in Windows PowerShell.  I have a script that requires me to change the ErrorActionPreference variable, but how can I set it to its original value after the script is done?  Store the current value of $ErrorActionPreference and set it again later: $OldEAP = $ErrorActionPreference $ErrorActionPreference = 'silentlycontinue' #Your script runs in here $ErrorActionPreference = $OldEAP