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
Post a Comment