Forum Discussion
johnmsch
Feb 07, 2023Copper Contributor
Write array values to Event Viewer?
Trying to debug an old PowerShell script that contains a small array, containing 5 -7 entries, each about 10-15 bytes long). I'm trying to write the contents of the array ($activeNode) to the Event ...
Feb 09, 2023
Did that work out for you?
johnmsch
Feb 13, 2023Copper Contributor
Sorry, haven't had a chance to test this yet, but should by tomorrow.
- Feb 23, 2023Any update?
- johnmschFeb 23, 2023Copper Contributor
Harm_Veenstra Sorry for the delay.
Changed the code to this:
$activenodeOut = $activenodeOut+ ($activenode[$i].ItemArray -join ",") Write-EventLog –LogName Application –Source eRxAppServer –EntryType Information –EventID 920 –Message "Active Node List:$activenodeOut"Now all I see is this line in Event Viewer:
Active Node List:- Feb 23, 2023No worries, and ok... What does the $activenodeOut variable contain?