EventLogRecord.Properties to Variable.


hi guys,

i trying store value of eventlog property(eventlogrecord.properties property) variable , table. 

but gets stored table given bellow:

 

-------------------------------------------------------------------------------------------------------------------

system.diagnostics.eventing.reader.eventproperty system.diagnostics.eventing.reader.eventproperty system.diagnostics.eventing.reader.eventproperty system.diagnostics.eventing.reader.eventproperty

-------------------------------------------------------------------------------------------------------------------

i getting output through "get-winevent" powershell cmdlet.

 

any in regard appreciated.

 

thanks & regards,

jaydeep.

 

here's example of assigning property of event log result variable:

$array = (get-winevent -logname system -maxevents 5)

$newarr = @()

$newarr += $array[0].id

$newarr | out-file d:\log.txt



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607