Backup/export custom view automatically from Event Viewerusers unable to view security log in event viewerHow do I fix a custom Event Viewer Log that merges automatically with the Application log?100% uptime for a web applicationWindows Server 2008 what is the proper way to export or backup security event logScript to export custom view Event Viewer to .evtx PowershellSave Custom View from Event Viewer in .evtxHow to export event viewer errors to Excel in Windows Server 2012How Can I Consolidate all Event Viewer Logs from different ServersIs it possible to view events from all event logs (including “Applications and Services Logs”) simultaneously?Enabling Event Viewer auditing on individual file modifications by Handler ID

Multi tool use
Multi tool use

What was Bran's plan to kill the Night King?

Voltage Balun 1:1

Can my 2 children, aged 10 and 12, who are US citizens, travel to the USA on expired American passports?

Is the book wrong about the Nyquist Sampling Criterion?

Why is "breaking the mould" positively connoted?

Find magical solution to magical equation

History of the kernel of a homomorphism?

What to use instead of cling film to wrap pastry

To kill a cuckoo

As a GM, is it bad form to ask for a moment to think when improvising?

Which sphere is fastest?

Javascript - Run my script only if landscape is detected

Copy previous line to current line from text file

Handling Null values (and equivalents) routinely in Python

Why is my arithmetic with a long long int behaving this way?

Is an HNN extension of a virtually torsion-free group virtually torsion-free?

Is there a word for food that's gone 'bad', but is still edible?

My first C++ game (snake console game)

How long would it take for people to notice a mass disappearance?

Why aren't nationalizations in Russia described as socialist?

All of my Firefox add-ons been disabled suddenly, how can I re-enable them?

Is disk brake effectiveness mitigated by tyres losing traction under strong braking?

How can I get people to remember my character's gender?

Endgame puzzle: How to avoid stalemate and win?



Backup/export custom view automatically from Event Viewer


users unable to view security log in event viewerHow do I fix a custom Event Viewer Log that merges automatically with the Application log?100% uptime for a web applicationWindows Server 2008 what is the proper way to export or backup security event logScript to export custom view Event Viewer to .evtx PowershellSave Custom View from Event Viewer in .evtxHow to export event viewer errors to Excel in Windows Server 2012How Can I Consolidate all Event Viewer Logs from different ServersIs it possible to view events from all event logs (including “Applications and Services Logs”) simultaneously?Enabling Event Viewer auditing on individual file modifications by Handler ID






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















How can I simply export or back-up a custom view from the event viewer? I do not want to export the regular Event logs, such as: System, Application, Security etc. But I want to export automatically my own whole custom view log with event id's.










share|improve this question
























  • You want to export the events that you see in your custom view, or you want to export the Custom View itself?

    – Mathias R. Jessen
    May 5 '14 at 10:32











  • I want to export the whole Custom View itself.

    – user3603657
    May 5 '14 at 10:33

















1















How can I simply export or back-up a custom view from the event viewer? I do not want to export the regular Event logs, such as: System, Application, Security etc. But I want to export automatically my own whole custom view log with event id's.










share|improve this question
























  • You want to export the events that you see in your custom view, or you want to export the Custom View itself?

    – Mathias R. Jessen
    May 5 '14 at 10:32











  • I want to export the whole Custom View itself.

    – user3603657
    May 5 '14 at 10:33













1












1








1








How can I simply export or back-up a custom view from the event viewer? I do not want to export the regular Event logs, such as: System, Application, Security etc. But I want to export automatically my own whole custom view log with event id's.










share|improve this question
















How can I simply export or back-up a custom view from the event viewer? I do not want to export the regular Event logs, such as: System, Application, Security etc. But I want to export automatically my own whole custom view log with event id's.







windows-server-2008 eventviewer






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 5 '14 at 10:33







user3603657

















asked May 5 '14 at 10:28









user3603657user3603657

3317




3317












  • You want to export the events that you see in your custom view, or you want to export the Custom View itself?

    – Mathias R. Jessen
    May 5 '14 at 10:32











  • I want to export the whole Custom View itself.

    – user3603657
    May 5 '14 at 10:33

















  • You want to export the events that you see in your custom view, or you want to export the Custom View itself?

    – Mathias R. Jessen
    May 5 '14 at 10:32











  • I want to export the whole Custom View itself.

    – user3603657
    May 5 '14 at 10:33
















You want to export the events that you see in your custom view, or you want to export the Custom View itself?

– Mathias R. Jessen
May 5 '14 at 10:32





You want to export the events that you see in your custom view, or you want to export the Custom View itself?

– Mathias R. Jessen
May 5 '14 at 10:32













I want to export the whole Custom View itself.

– user3603657
May 5 '14 at 10:33





I want to export the whole Custom View itself.

– user3603657
May 5 '14 at 10:33










1 Answer
1






active

oldest

votes


















0














Open up the Custom View properties, select Edit Filter and then switch to the XML tab and copy the filter.



enter image description here



You can now use the filter with PowerShell, like this:



[xml]$CustomView = @"
<QueryList>
<Query Id="0" Path="Application">
<Select Path="Application">*[System[(Level=2 or Level=3) and ( (EventID &gt;= 1000 and EventID &lt;= 2000) )]]</Select>
</Query>
</QueryList>
"@

Get-WinEvent -FilterXML $CustomView | Export-CSV "C:LogFilesCustomView_$(Get-Date -format "yyyy-MM-DD").log"


Set up a scheduled task to run a script like the above every week






share|improve this answer

























  • And how can I put this in a scheduled task in the Task Scheduler? I want this custom view every week on friday in a *.evtx file if possible. Should I run a script or something with the Task Scheduler?

    – user3603657
    May 5 '14 at 10:37











  • I've put this in a .ps1 file and ran it with PowerShell but nothing happens. The PowerShell appears, but disappears within 1 second and nothing happens after that. No folder is create on C: or such. How to fix it?

    – user3603657
    May 5 '14 at 11:47












  • If you used my exact query you probably won't get any results. Run the script from within an existing powershell session to see any errors it might produce

    – Mathias R. Jessen
    May 5 '14 at 11:51












  • I still get errors but it's dissappearing so quickly, I can't even read it. Within 1 second it's gone. Can you test your script for errors perhaps?

    – user3603657
    May 6 '14 at 10:04











  • I've managed to get it working but now it's saving as a .log file. Isn't there a way to save it as a .xml or csv to open in an Excel sheet? How to make it human readable?? Can I save it as .evtx to open in the Event Viewer?

    – user3603657
    May 6 '14 at 13:07











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f593134%2fbackup-export-custom-view-automatically-from-event-viewer%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Open up the Custom View properties, select Edit Filter and then switch to the XML tab and copy the filter.



enter image description here



You can now use the filter with PowerShell, like this:



[xml]$CustomView = @"
<QueryList>
<Query Id="0" Path="Application">
<Select Path="Application">*[System[(Level=2 or Level=3) and ( (EventID &gt;= 1000 and EventID &lt;= 2000) )]]</Select>
</Query>
</QueryList>
"@

Get-WinEvent -FilterXML $CustomView | Export-CSV "C:LogFilesCustomView_$(Get-Date -format "yyyy-MM-DD").log"


Set up a scheduled task to run a script like the above every week






share|improve this answer

























  • And how can I put this in a scheduled task in the Task Scheduler? I want this custom view every week on friday in a *.evtx file if possible. Should I run a script or something with the Task Scheduler?

    – user3603657
    May 5 '14 at 10:37











  • I've put this in a .ps1 file and ran it with PowerShell but nothing happens. The PowerShell appears, but disappears within 1 second and nothing happens after that. No folder is create on C: or such. How to fix it?

    – user3603657
    May 5 '14 at 11:47












  • If you used my exact query you probably won't get any results. Run the script from within an existing powershell session to see any errors it might produce

    – Mathias R. Jessen
    May 5 '14 at 11:51












  • I still get errors but it's dissappearing so quickly, I can't even read it. Within 1 second it's gone. Can you test your script for errors perhaps?

    – user3603657
    May 6 '14 at 10:04











  • I've managed to get it working but now it's saving as a .log file. Isn't there a way to save it as a .xml or csv to open in an Excel sheet? How to make it human readable?? Can I save it as .evtx to open in the Event Viewer?

    – user3603657
    May 6 '14 at 13:07















0














Open up the Custom View properties, select Edit Filter and then switch to the XML tab and copy the filter.



enter image description here



You can now use the filter with PowerShell, like this:



[xml]$CustomView = @"
<QueryList>
<Query Id="0" Path="Application">
<Select Path="Application">*[System[(Level=2 or Level=3) and ( (EventID &gt;= 1000 and EventID &lt;= 2000) )]]</Select>
</Query>
</QueryList>
"@

Get-WinEvent -FilterXML $CustomView | Export-CSV "C:LogFilesCustomView_$(Get-Date -format "yyyy-MM-DD").log"


Set up a scheduled task to run a script like the above every week






share|improve this answer

























  • And how can I put this in a scheduled task in the Task Scheduler? I want this custom view every week on friday in a *.evtx file if possible. Should I run a script or something with the Task Scheduler?

    – user3603657
    May 5 '14 at 10:37











  • I've put this in a .ps1 file and ran it with PowerShell but nothing happens. The PowerShell appears, but disappears within 1 second and nothing happens after that. No folder is create on C: or such. How to fix it?

    – user3603657
    May 5 '14 at 11:47












  • If you used my exact query you probably won't get any results. Run the script from within an existing powershell session to see any errors it might produce

    – Mathias R. Jessen
    May 5 '14 at 11:51












  • I still get errors but it's dissappearing so quickly, I can't even read it. Within 1 second it's gone. Can you test your script for errors perhaps?

    – user3603657
    May 6 '14 at 10:04











  • I've managed to get it working but now it's saving as a .log file. Isn't there a way to save it as a .xml or csv to open in an Excel sheet? How to make it human readable?? Can I save it as .evtx to open in the Event Viewer?

    – user3603657
    May 6 '14 at 13:07













0












0








0







Open up the Custom View properties, select Edit Filter and then switch to the XML tab and copy the filter.



enter image description here



You can now use the filter with PowerShell, like this:



[xml]$CustomView = @"
<QueryList>
<Query Id="0" Path="Application">
<Select Path="Application">*[System[(Level=2 or Level=3) and ( (EventID &gt;= 1000 and EventID &lt;= 2000) )]]</Select>
</Query>
</QueryList>
"@

Get-WinEvent -FilterXML $CustomView | Export-CSV "C:LogFilesCustomView_$(Get-Date -format "yyyy-MM-DD").log"


Set up a scheduled task to run a script like the above every week






share|improve this answer















Open up the Custom View properties, select Edit Filter and then switch to the XML tab and copy the filter.



enter image description here



You can now use the filter with PowerShell, like this:



[xml]$CustomView = @"
<QueryList>
<Query Id="0" Path="Application">
<Select Path="Application">*[System[(Level=2 or Level=3) and ( (EventID &gt;= 1000 and EventID &lt;= 2000) )]]</Select>
</Query>
</QueryList>
"@

Get-WinEvent -FilterXML $CustomView | Export-CSV "C:LogFilesCustomView_$(Get-Date -format "yyyy-MM-DD").log"


Set up a scheduled task to run a script like the above every week







share|improve this answer














share|improve this answer



share|improve this answer








edited May 5 '14 at 10:44

























answered May 5 '14 at 10:34









Mathias R. JessenMathias R. Jessen

22.8k35189




22.8k35189












  • And how can I put this in a scheduled task in the Task Scheduler? I want this custom view every week on friday in a *.evtx file if possible. Should I run a script or something with the Task Scheduler?

    – user3603657
    May 5 '14 at 10:37











  • I've put this in a .ps1 file and ran it with PowerShell but nothing happens. The PowerShell appears, but disappears within 1 second and nothing happens after that. No folder is create on C: or such. How to fix it?

    – user3603657
    May 5 '14 at 11:47












  • If you used my exact query you probably won't get any results. Run the script from within an existing powershell session to see any errors it might produce

    – Mathias R. Jessen
    May 5 '14 at 11:51












  • I still get errors but it's dissappearing so quickly, I can't even read it. Within 1 second it's gone. Can you test your script for errors perhaps?

    – user3603657
    May 6 '14 at 10:04











  • I've managed to get it working but now it's saving as a .log file. Isn't there a way to save it as a .xml or csv to open in an Excel sheet? How to make it human readable?? Can I save it as .evtx to open in the Event Viewer?

    – user3603657
    May 6 '14 at 13:07

















  • And how can I put this in a scheduled task in the Task Scheduler? I want this custom view every week on friday in a *.evtx file if possible. Should I run a script or something with the Task Scheduler?

    – user3603657
    May 5 '14 at 10:37











  • I've put this in a .ps1 file and ran it with PowerShell but nothing happens. The PowerShell appears, but disappears within 1 second and nothing happens after that. No folder is create on C: or such. How to fix it?

    – user3603657
    May 5 '14 at 11:47












  • If you used my exact query you probably won't get any results. Run the script from within an existing powershell session to see any errors it might produce

    – Mathias R. Jessen
    May 5 '14 at 11:51












  • I still get errors but it's dissappearing so quickly, I can't even read it. Within 1 second it's gone. Can you test your script for errors perhaps?

    – user3603657
    May 6 '14 at 10:04











  • I've managed to get it working but now it's saving as a .log file. Isn't there a way to save it as a .xml or csv to open in an Excel sheet? How to make it human readable?? Can I save it as .evtx to open in the Event Viewer?

    – user3603657
    May 6 '14 at 13:07
















And how can I put this in a scheduled task in the Task Scheduler? I want this custom view every week on friday in a *.evtx file if possible. Should I run a script or something with the Task Scheduler?

– user3603657
May 5 '14 at 10:37





And how can I put this in a scheduled task in the Task Scheduler? I want this custom view every week on friday in a *.evtx file if possible. Should I run a script or something with the Task Scheduler?

– user3603657
May 5 '14 at 10:37













I've put this in a .ps1 file and ran it with PowerShell but nothing happens. The PowerShell appears, but disappears within 1 second and nothing happens after that. No folder is create on C: or such. How to fix it?

– user3603657
May 5 '14 at 11:47






I've put this in a .ps1 file and ran it with PowerShell but nothing happens. The PowerShell appears, but disappears within 1 second and nothing happens after that. No folder is create on C: or such. How to fix it?

– user3603657
May 5 '14 at 11:47














If you used my exact query you probably won't get any results. Run the script from within an existing powershell session to see any errors it might produce

– Mathias R. Jessen
May 5 '14 at 11:51






If you used my exact query you probably won't get any results. Run the script from within an existing powershell session to see any errors it might produce

– Mathias R. Jessen
May 5 '14 at 11:51














I still get errors but it's dissappearing so quickly, I can't even read it. Within 1 second it's gone. Can you test your script for errors perhaps?

– user3603657
May 6 '14 at 10:04





I still get errors but it's dissappearing so quickly, I can't even read it. Within 1 second it's gone. Can you test your script for errors perhaps?

– user3603657
May 6 '14 at 10:04













I've managed to get it working but now it's saving as a .log file. Isn't there a way to save it as a .xml or csv to open in an Excel sheet? How to make it human readable?? Can I save it as .evtx to open in the Event Viewer?

– user3603657
May 6 '14 at 13:07





I've managed to get it working but now it's saving as a .log file. Isn't there a way to save it as a .xml or csv to open in an Excel sheet? How to make it human readable?? Can I save it as .evtx to open in the Event Viewer?

– user3603657
May 6 '14 at 13:07

















draft saved

draft discarded
















































Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f593134%2fbackup-export-custom-view-automatically-from-event-viewer%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







3JA2cMKq4TFPksXfc82sA8PXEEwX96nVw UY s bYwF PCYNfLy8KNK30gc1K5yH3XZb,7R D6EY5Qp,n
2D8QWQ8J

Popular posts from this blog

RemoteApp sporadic failureWindows 2008 RemoteAPP client disconnects within a matter of minutesWhat is the minimum version of RDP supported by Server 2012 RDS?How to configure a Remoteapp server to increase stabilityMicrosoft RemoteApp Active SessionRDWeb TS connection broken for some users post RemoteApp certificate changeRemote Desktop Licensing, RemoteAPPRDS 2012 R2 some users are not able to logon after changed date and time on Connection BrokersWhat happens during Remote Desktop logon, and is there any logging?After installing RDS on WinServer 2016 I still can only connect with two users?RD Connection via RDGW to Session host is not connecting

Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020