Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft Hyper-V PowerShell Automation

You're reading from   Microsoft Hyper-V PowerShell Automation Manage, automate, and streamline your Hyper-V environment effectively with advanced PowerShell cmdlets

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher
ISBN-13 9781784391539
Length 124 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Vinith Menon Vinith Menon
Author Profile Icon Vinith Menon
Vinith Menon
Arrow right icon
View More author details
Toc

Table of Contents (8) Chapters Close

Preface 1. New PowerShell Cmdlets in Hyper-V on Windows Server 2012 R2 FREE CHAPTER 2. Managing Your Hyper-V Virtual Infrastructure 3. Managing Your Hyper-V Virtual Machines 4. Creating Reusable PowerShell Scripts Using Hyper-V PowerShell Module Cmdlets 5. The Next Step – Integration with SCVMM 6. Troubleshooting Hyper-V Environment Issues and Best Practices Using PowerShell Index

Troubleshooting the Hyper-V environment using the event log

The Hyper-V administrator can use the Get-EventLog cmdlet to get the events related to Hyper-V. Monitoring these events using the Event Viewer GUI is a very tedious task. The following screenshot shows a view of the event log in the Event Viewer GUI. Scrolling through these events is a tedious task, as there are a lot of system-related events that are not related to Hyper-V:

Troubleshooting the Hyper-V environment using the event log

The Get-EventLog cmdlet can be directed to filter only the events that are related to Hyper-V. To do this, open up a PowerShell prompt in administrative mode and run the following command:

Get-EventLog system -source *Hyper-V* -after "07/21/2014"

The preceding command will query for all events related to Hyper-V in the system event log that occurred after July 27, 2014. Once we execute the preceding command, we will get the output returned as follows:

Troubleshooting the Hyper-V environment using the event log

As you can see, I get all the required information filtered out from thousands of events that were...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image