get-winevent has no message data when using Powershell 3 ?
-
Thursday, October 18, 2012 9:06 AM
Hello, please see this post I made here in may,
I updated a couple of server 2008 R2s to Powershell 3, now I get the same problem as in the link above on those.
Anyone else have the same problem?
Thanks,
edit: I tried to revert back to Powershell 2, then it works again.- Edited by oddt Thursday, October 18, 2012 9:08 AM
All Replies
-
Thursday, October 18, 2012 9:25 AM
I am working with PowerShell v3 on 2008 R2 as well. I used the following command and got both the ID and the message:
get-winevent -logname system -maxevents 10 | ft id,message
Are you saying that the message field is completely empty when you execute the command on PowerShell v3?
Jaap Brasser
http://www.jaapbrasser.com -
Thursday, October 18, 2012 9:31 AMI have the same problem on some machines. No message field. But I have investigated this over and over, and still can't find the reason.
Grant Ward, a.k.a. Bigteddy
-
Thursday, October 18, 2012 10:13 AM
Hi,
Yes it is exactly as in the previous post from may, the "id" shows, but no "message".
I googled something about get-winevent requires the en-US locale, I tried to switch to that but still no luck.
Either way, when I revert back to Powershell 2 it works again, so it can't have anything to say?
-
Thursday, October 18, 2012 10:17 AM
I know there is a connect ticket open for this, have a look at it here since it seems like it is a bug:
Jaap Brasser
http://www.jaapbrasser.com- Marked As Answer by oddt Thursday, October 18, 2012 10:38 AM
-
Thursday, October 18, 2012 10:38 AM
Okay, looks like it is...
It says systems with the en-US locale set shouldn't be affected, I thought I could set it with set-culture, nevermind, I'll look into it.
Anyways, thanks for help!
-
Thursday, October 18, 2012 10:05 PM
It looks like it is the issue I found (after similar symptoms from PSH v2 running under .NET4):
Richard J Cox
- Marked As Answer by Yan Li_Microsoft Contingent Staff, Moderator Tuesday, October 23, 2012 3:25 AM
-
Thursday, December 20, 2012 2:19 PM
Confirming same on W2008R2 and Win7
ps2
PS C:\> Get-WinEvent -FilterHashtable @{ProviderName="Application Popup"}
-MaxEvents 2 -Computer SERVER1 | Select TimeCreated, Message TimeCreated Message ----------- ------- 20/12/2012 13:34:50 Application popup: P-touch Editor - ... 19/12/2012 16:52:13 Application popup: Windows - Delayed... PS C:\> $host Name : ConsoleHost Version : 2.0 InstanceId : 4ce0f3e6-2673-4537-863a-356a3861f407 UI : System.Management.Automation.Internal.Host.InternalHostUserI nterface CurrentCulture : en-GB CurrentUICulture : en-US PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy IsRunspacePushed : False Runspace : System.Management.Automation.Runspaces.LocalRunspace
ps3
PS C:\> Get-WinEvent -FilterHashtable @{ProviderName="Application Popup"}
-MaxEvents 2 -Computer SERVER1 | Select TimeCreated, MessageTimeCreated Message ----------- ------- 20/12/2012 13:34:50 19/12/2012 16:52:13 PS C:\> $host Name : ConsoleHost Version : 3.0 InstanceId : 6775fce1-1d66-4467-8c47-504d5e5667e1 UI : System.Management.Automation.Internal.Host.InternalHostUserInterface CurrentCulture : en-GB CurrentUICulture : en-US PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy IsRunspacePushed : False Runspace : System.Management.Automation.Runspaces.LocalRunspace

