Am novice with PS Scripting and am looking for assistance for the below requirement for Dell Servers:
Read the System Event logs for Event ID 2048, Extract the Time the even was generated, Physical Disk Number on specific RAID controller.
For Example:
Get-WinEvent -FilterHashtable @{logname='System' ; id=2048} -MaxEvents 1
Returns Output:
ProviderName: Server Administrator
TimeCreated Id LevelDisplayName Message
----------- -- ---------------- -------
3/26/2018 1:18:51 AM 2048 Error Device failed: Physical Disk 0:0:13 Controller 0, Connector 0
I want to extract the disk and controller numbers along with the date in the following format:
**Disk-Failure, Date = 3/26/2018 1:18:51 AM , Physical Disk Number = 0:0:13 , Controller = 0 , Connector = 0**
Please assist.
Thank You.