 Rank: Newbie Joined: 6/13/2016(UTC) Posts: 10  Location: Prague Thanks: 2 times
|
Originally Posted by: Scott  @PeopleInNeed what other extensions do you have installed? Also, can you post a screenshot of the behavior you're seeing? Hello Scott, Extensions: Batch Audit Recording Downloader Status: ActiveVersion: 1.0.8 Remote System Diagnostics Status: ActiveVersion: 1.3.4 Report Manager Status: ActiveVersion: 1.7.6 
|
|
|
|
 Rank: Advanced Member Medals:   Joined: 9/14/2011(UTC) Posts: 360 Location: ON, Canada
Thanks: 31 times Was thanked: 14 time(s) in 11 post(s)
|
Originally Posted by: Scott  @promptcare for some reason I thought I had already responded to your previous query but I guess not, sorry! There isn't a simple way to do this, but you could always clone the extension and then modify the new Initializer.js. The command can be found around line 354 (roughly): Code:
case "ps/powershell/xml/EventLog": return "Get-EventLog Application -newest " + getValidEventLogCount() + " | Select TimeWritten, EntryType, Source, Message | Sort TimeWritten -Descending | ConvertTo-Xml -As Stream";
Modify it to: Code:
case "ps/powershell/xml/EventLog": return "Get-EventLog Application -newest -EntryType Error " + getValidEventLogCount() + " | Select TimeWritten, EntryType, Source, Message | Sort TimeWritten -Descending | ConvertTo-Xml -As Stream";
Which will only filter the Error entries. I will look at incorporating this into a future revision if there's a clean way to do it. Don't feel bad about not replying quickly - I missed this reply myself. Made the recommended change (first time editing an extension) but it was a straight copy/paste so went for it ... BUT...I'm getting an error in the CMD window: Quote:DIAGNOSTIC-RESPONSE/1 DiagnosticType: EventLog ContentType: xml
Get-EventLog : Missing an argument for parameter 'Newest'. Specify a parameter of type 'System.Int32' and try again. At line:1 char:26 + Get-EventLog Application -newest -EntryType Error 10 | Select TimeWri ... + ~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Get-EventLog], ParameterBindingException + FullyQualifiedErrorId : MissingArgument,Microsoft.PowerShell.Commands.GetEventLogCommand I don't know if it matters but, even before editing, this warning was showing in the editor: 
|
|
|
|
 Rank:: Administration Medals:  Joined: 10/2/2015(UTC) Posts: 329
Thanks: 1 times Was thanked: 71 time(s) in 63 post(s)
|
You'll need to transpose -EntryType Error and getValidEventLogCount() since powershell is expecting an integer immediately after the -newest switch: Code:case "ps/powershell/xml/EventLog": return "Get-EventLog Application -newest " + getValidEventLogCount() + " -EntryType Error | Select TimeWritten, EntryType, Source, Message | Sort TimeWritten -Descending | ConvertTo-Xml -As Stream";
|
ScreenConnect Team |
|
|
|
 Rank: Advanced Member Medals:   Joined: 9/14/2011(UTC) Posts: 360 Location: ON, Canada
Thanks: 31 times Was thanked: 14 time(s) in 11 post(s)
|
Thanks, Ben. Worked like a charm. Seeing the last few actual Errors in the log is a thousand times more useful.
|
|
|
|
 Rank: Member Medals:  Joined: 5/13/2014(UTC) Posts: 28  Location: Texas Thanks: 29 times Was thanked: 6 time(s) in 4 post(s)
|
@scott Thank you for the extension and keeping it updated. For those interested, I made a modification to the Event Log command to pull both Application and System events: Code:case "ps/powershell/xml/EventLog": return "\"Application\",\"System\" | foreach { Get-EventLog -LogName $_ -newest " + getValidEventLogCount() + " } | Select TimeWritten, EntryType, Source, Message | Sort TimeWritten -Descending | ConvertTo-Xml -As Stream";
You can modify the code to pull from any of the available logs (Get-EventLog -list) on a system.
|
|
|
|
 Rank: Advanced Member Medals:   Joined: 9/14/2011(UTC) Posts: 360 Location: ON, Canada
Thanks: 31 times Was thanked: 14 time(s) in 11 post(s)
|
Could this, perhaps, support reading the most recent Windows Memory Diagnostic results and the last Chkdsk results?
|
|
|
|
 Rank: Administration Medals:  Joined: 3/28/2014(UTC) Posts: 2,862  Thanks: 3 times Was thanked: 351 time(s) in 303 post(s)
|
@promptcare Potentially, do you have an example of a command you execute to retrieve that information? |
ScreenConnect Team |
|
|
|
 Rank: Advanced Member Medals:   Joined: 9/14/2011(UTC) Posts: 360 Location: ON, Canada
Thanks: 31 times Was thanked: 14 time(s) in 11 post(s)
|
Unfortunately, they're not commands but very specific results in the Event Viewer. ChkDsk results are under Application and filtered under 'Chkdsk' as the Source. Memory Diagnostic results are under System and filtered under 'MemoryDiagnostics-Results' as the Source. Incidentally, to schedule a memory diagnostics, you can send this through the CMD window: bcdedit.exe /bootsequence {memdiag} ...and, if you change you mind, clear it with bcdedit.exe /bootsequence {memdiag} /remove Schedule a Chkdsk with: echo y | chkdsk c: /f /rEdited by user Wednesday, February 15, 2017 3:17:44 PM(UTC)
| Reason: Not specified
|
|
|
|
 Rank: Administration Medals:  Joined: 3/28/2014(UTC) Posts: 2,862  Thanks: 3 times Was thanked: 351 time(s) in 303 post(s)
|
@promptcare So, retrieving that kind of information is definitely possible, but I'm having a hard time thinking of how best to incorporate it. In considering your request I started to think about how useful it would be to pull more information from the Event Viewer in general. I have started to spec out a few different ways to do this and while I'm slowly starting to work on Remote System Diagnostics v2, this might be more useful as a separate extension. Either way, I've registered the request and I'll continue to think about it. While it doesn't answer your question specifically, you can use the following two powershell commands to retrieve the information about MemoryDiagnostics and Chkdsk: Code:Get-EventLog System | Where-Object {$_.Source -eq "MemoryDiagnostics-Results"} | format-list
Code:Get-EventLog Application | Where-Object {$_.Source -eq "Chkdsk"} | format-list
|
ScreenConnect Team |
|
|
|
 Rank: Administration Medals:  Joined: 3/28/2014(UTC) Posts: 2,862  Thanks: 3 times Was thanked: 351 time(s) in 303 post(s)
|
Updated extension to version 1.4 to include a filter capability within each diagnostic tab |
ScreenConnect Team |
|
|
|
 Rank: Member Medals:  Joined: 5/13/2014(UTC) Posts: 28  Location: Texas Thanks: 29 times Was thanked: 6 time(s) in 4 post(s)
|
Thank you for a very useful and handy extension. In light of the changes coming in 6.5 regarding custom extensions, can I ask that this extension be modified to include the system eventlog along with the application eventlog? I cloned the extension and modified line 376 of the initializer.js file: Original: Code:case "ps/powershell/xml/EventLog": return "Get-EventLog Application -newest " + getValidEventLogCount() + " | Select TimeWritten, EntryType, Source, Message | Sort TimeWritten -Descending | ConvertTo-Xml -As Stream";
Modification: Code:case "ps/powershell/xml/EventLog": return "\"Application\",\"System\" | foreach { Get-EventLog -LogName $_ -newest " + getValidEventLogCount() + " } | Select TimeWritten, EntryType, Source, Message | Sort TimeWritten -Descending | ConvertTo-Xml -As Stream";
Thank you. PS: This was mentioned in post#55 above. Edited by user Wednesday, December 13, 2017 9:44:20 PM(UTC)
| Reason: added info about post #55
|
|
|
|
 Rank: Newbie Joined: 12/16/2016(UTC) Posts: 16  Location: nj Thanks: 2 times
|
I am seeing an issue after upgrading to 6.5 where some machines will pull the information in the command windows, but will not put it into the General tab. see below, the same machine: INFORMATIONREQUEST-RESPONSE/1 CommandType: General ContentType: xml <?xml version="1.0"?> <Objects> <Object Type="System.String">Dell Inc.</Object> <Object Type="System.String">PowerEdge T620</Object> <Object Type="System.String">Phoenix ROM BIOS PLUS Version 1.10 2.5.2</Object> <Object Type="System.String">80NWL02</Object> </Objects> IMAGE
|
|
|
|
 Rank: Administration Medals:  Joined: 3/28/2014(UTC) Posts: 2,862  Thanks: 3 times Was thanked: 351 time(s) in 303 post(s)
|
@artingerb that's for the Additional General Information extension, not Remote System Diagnostics.
|
ScreenConnect Team |
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.