logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
PeopleInNeed  
#51 Posted : Tuesday, October 25, 2016 1:08:48 PM(UTC)
PeopleInNeed


Rank: Newbie

Joined: 6/13/2016(UTC)
Posts: 10
Czech Republic
Location: Prague

Thanks: 2 times
Originally Posted by: Scott Go to Quoted Post
@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



Screenshot
promptcare  
#52 Posted : Saturday, December 31, 2016 11:01:37 PM(UTC)
promptcare


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 2: Lent a Helping Hand! 10 Thanks!

Joined: 9/14/2011(UTC)
Posts: 353
Location: ON, Canada

Thanks: 30 times
Was thanked: 13 time(s) in 11 post(s)
Originally Posted by: Scott Go to Quoted Post
@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:
UserPostedImage
Ben B  
#53 Posted : Tuesday, January 3, 2017 1:40:36 PM(UTC)
Ben B


Rank: Administration

Medals: Level 2: Lent a Helping Hand! 10 Thanks!

Joined: 10/2/2015(UTC)
Posts: 283

Thanks: 1 times
Was thanked: 58 time(s) in 54 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
promptcare  
#54 Posted : Tuesday, January 3, 2017 9:58:19 PM(UTC)
promptcare


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 2: Lent a Helping Hand! 10 Thanks!

Joined: 9/14/2011(UTC)
Posts: 353
Location: ON, Canada

Thanks: 30 times
Was thanked: 13 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.
ebell  
#55 Posted : Thursday, February 2, 2017 5:58:58 PM(UTC)
ebell


Rank: Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 5/13/2014(UTC)
Posts: 15
United States
Location: Texas

Thanks: 16 times
Was thanked: 5 time(s) in 3 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.
promptcare  
#56 Posted : Tuesday, February 14, 2017 3:23:19 PM(UTC)
promptcare


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 2: Lent a Helping Hand! 10 Thanks!

Joined: 9/14/2011(UTC)
Posts: 353
Location: ON, Canada

Thanks: 30 times
Was thanked: 13 time(s) in 11 post(s)
Could this, perhaps, support reading the most recent Windows Memory Diagnostic results and the last Chkdsk results?
Scott  
#57 Posted : Wednesday, February 15, 2017 2:42:05 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,518
United States

Thanks: 3 times
Was thanked: 305 time(s) in 262 post(s)
@promptcare Potentially, do you have an example of a command you execute to retrieve that information?
ScreenConnect Team
promptcare  
#58 Posted : Wednesday, February 15, 2017 3:17:03 PM(UTC)
promptcare


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 2: Lent a Helping Hand! 10 Thanks!

Joined: 9/14/2011(UTC)
Posts: 353
Location: ON, Canada

Thanks: 30 times
Was thanked: 13 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 /r

Edited by user Wednesday, February 15, 2017 3:17:44 PM(UTC)  | Reason: Not specified

Scott  
#59 Posted : Friday, February 17, 2017 2:10:05 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,518
United States

Thanks: 3 times
Was thanked: 305 time(s) in 262 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
Scott  
#60 Posted : Tuesday, February 28, 2017 6:33:35 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,518
United States

Thanks: 3 times
Was thanked: 305 time(s) in 262 post(s)
Updated extension to version 1.4 to include a filter capability within each diagnostic tab
ScreenConnect Team
ebell  
#61 Posted : Wednesday, December 13, 2017 9:42:23 PM(UTC)
ebell


Rank: Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 5/13/2014(UTC)
Posts: 15
United States
Location: Texas

Thanks: 16 times
Was thanked: 5 time(s) in 3 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

Users browsing this topic
2 Pages<12
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.