Get-EventLog can read events only from one event log at a time. If you want to find events in multiple event logs, you can append array information, though:
$events =
@(Get-EventLog -LogName
System -EntryType
Error)
$events +=
Get-EventLog -LogName
Application -EntryType
Error
$events
In these
cases, it might be easier to use WMI in the first place - which can
query any number of event logs at the same time.This will get you the first 100 error events from the application and system log (cumulated, so if the first 100 errors are in the application log, no system log errors will be reported, of course):
Get-WmiObject -Class
Win32_NTLogEvent -Filter
'Type="Error" and
(LogFile="System" or LogFile="Application")' |
Select-Object
-First 100 -Property TimeGenerated, LogFile, EventCode, Message
When you replace
Get-WmiObject with Get-CimInstance (which is new in PowerShell 3.0), then the
cryptic WMI datetime format is automatically converted to normal date and
times:
Get-CimInstance -Class Win32_NTLogEvent -Filter 'Type="Error" and (LogFile="System" or LogFile="Application")' |
Select-Object
-First 100 -Property TimeGenerated, LogFile, EventCode, Message
I found a fix on this page:
http://www.jmedved.com/2013/09...or-8-without-a-product-key/
8.1 does not allow you to do a clean instal with a 8.0 key, but you can activate 8.1 with a 8.0 key once you are past that hurdle.
I recommend making a USB stick installer, then go to the sources folder, in there create a .txt file with notepad with the contents:
[EditionID]
Professional
[Channel]
Retail
[VL]
0
This is assuming you use the pro edition like me.
Next save that file as ei.cfg in the sources folder, this makes the installer skip the key check !
You can instal 8.1 without a key and when you are done it asks you to remove the USB stick, it reboots, and starts the OOBE.
This asks you for a key again but this time it DOES accept your 8.0 key and activates windows.
When you finally get a desktop you can check the system window, it will tell you Windows is activated.
The final problem is that this gave me a non-functional 300MB recovery partition created by the installation proces, that still did not allow me to use refresh/reset, still missing files.
The USB stick installer you create however does allow you to refresh/reset when plugged in, but this does not restore your recovery partition, but you can use the feature.
I also really wanted to have a usable recovery partition on my harddrive, turns out making one is really simple.
To do this create some unpartitioned space, I used 3200MB.
In this space create a 3200MB NTFS partition, and volume, I named it 8.1 recovery but any name will do, and do a quick format.
Next copy the contents of the ISO or the contents of your USB installer into that partition, it should leave about 87 MB free space.
You can remove the drive letter if you like, so you can`t accidentally modify the files easily.
Remove your USB stick or unmount the ISO and you fill find that the refresh/reset features now work :)
http://www.jmedved.com/2013/09/installing-windows-8-1-or-8-without-a-product-key/