Skip to content

Commit

Permalink
Merge pull request #3 from russelltomkins/Development
Browse files Browse the repository at this point in the history
Updates for 1.2
  • Loading branch information
russelltomkins authored Apr 27, 2017
2 parents d1ad3ce + 7815017 commit af47fc1
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 55 deletions.
14 changes: 7 additions & 7 deletions Create-CustomViews.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ Write-Host "`nLaunch Event Viwer (eventvwr.exe) and expand Custom Views to use t
# AgEBMHYwYjELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcG
# A1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTEhMB8GA1UEAxMYRGlnaUNlcnQgQXNzdXJl
# ZCBJRCBDQS0xAhADAZoCOv9YsWvW1ermF/BmMAkGBSsOAwIaBQCgXTAYBgkqhkiG
# 9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNzA0MDYxMjAwNTBa
# 9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNzA0MjcxMzI2NTJa
# MCMGCSqGSIb3DQEJBDEWBBQjjsKnRRahp8E/oxtMOCizmT6raDANBgkqhkiG9w0B
# AQEFAASCAQAevhz5h1IaLpwLxoy4lKJ9KbOCHYS5afAlHms7cOSyTBF6wPtErp1+
# dlKQePXSPQjEnVuunbACbjZ1M1sCRdECPXTxZJN/c6OVE6PzgMLqXukzttdAeF0I
# JMAv5LTt9mPBb0/Ix4t4YxpZahuIXAj1fp7Kbv+v6//+NidRNs0VPbhgIuBv9CVB
# 94ugKQWHu3fVPmRMTY7k5Grx/XsXBjQxQbVD7tAAizOAaCFioavYMfR9EsDu+lWA
# NbBe7BwayCqvyM/TMlKtvh+DIhDortznbJiUT04FKcWSDhn22xUflmt0UTvm5Z0b
# zStCeO2xNPsL24raX38FXEAanBBlVkx0
# AQEFAASCAQCclzjqREwCjRhgLSXNCnTn3ginsyBRX5199V5lTHM1km5/G7NCSMeK
# TEgc0r+1leh1IRJ1N4XDSQRDK3uustzVzetZk49z2iDDNnA3D2l5wwIowEnTzEmi
# LO4YtQ0WtHNF7WLx73isutQyf2Id7bUy41pKmgWMnnUF11sf64BG6ZGsKIv2kYXE
# D24Pf8EbVL9prmBRPrSWILRtA8xXoyFtlFPH4zweglJPQ6m5uouXRHTgvnr6d5UY
# mC9USr4L1p+PZEk6S5RAy0QoPctT2KjvZzq3emIsvpY/qJZrT0wkBHJVpijR7Gpn
# aHqUWhSNU2a8MuoKR7ajwlCh8fVfv40c
# SIG # End signature block
40 changes: 20 additions & 20 deletions Create-Manifest.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<#
<#
.SYNOPSIS
Name: Create-Manifest.ps1
Version: 1.1
Expand Down Expand Up @@ -119,10 +119,10 @@ $xmlWriter.WriteStartElement("instrumentation")
$xmlWriter.WriteEndElement() # Closing events
$xmlWriter.WriteEndElement() # Closing Instrumentation
$xmlWriter.WriteEndElement() # Closing instrumentationManifest
 

# End the XML Document
$xmlWriter.WriteEndDocument()
 

# Finish The Document
$xmlWriter.Finalize
$xmlWriter.Flush()
Expand All @@ -147,8 +147,8 @@ Write-Host "`t `"c:\windows\system32\wevtutil.exe`" im `"$DLLPath\$BaseName.man`
# SIG # Begin signature block
# MIIgVAYJKoZIhvcNAQcCoIIgRTCCIEECAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCClCmr0opDAE+lP
# 3KmO1Yo/zh3Uyu3u6vT24xFcxuNZ9aCCG14wggO3MIICn6ADAgECAhAM5+DlF9hG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCAz875ReOXG/tv
# zTHsBCsL3pUtOzV1o4CS9g/Fp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tXwAaOXcWA2YaQ21HShPW8
# 9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNzA0MjcxMzI4NTZa
# MCMGCSqGSIb3DQEJBDEWBBQYe1EBmfCyrVtJc5bOQ7EEe1tR+zANBgkqhkiG9w0B
# AQEFAASCAQA1O0ow+OyJeUFbdHvCQRJ5jKrxYWmglJvKZN2SSa/DHvvcffnmqRO/
# b7CjwJrZKULDf7r+QTmba2QeRff0VdybnFIZqv+0vUR7TEKhiU1Db7Ekjhwh/mIP
# G00wgFyfr+aim8oSrWVIoQ3j2YQketG/GfF+r7zYL2TN9q81z9Sk3cCeVm+e5iS9
# FqtirVu2yNK85F/4gCTfbHi1bz7dVrSwoXfiZZ/gTKPajA6biQQXOZGV684YwqiD
# Cz8re1vhtD5dOB4QJsgbnx95iioVbkDn7Yfe80IWghECA487xAtnlVb8RN+uC9m0
# qessUvZkWtTKQUz1xmX6HP/DfNfWPmvG
# SIG # End signature block
55 changes: 34 additions & 21 deletions Create-Subscriptions.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<#
.SYNOPSIS
Name: Create-Subscriptions.ps1
Version: 1.1
Version: 1.2
Author: Russell Tomkins - Microsoft Premier Field Engineer
Blog: https://aka.ms/russellt
Expand All @@ -19,11 +19,16 @@
.EXAMPLE
Create and Import the WEC subscriptions (disabled by default)
Create-Subscriptions.ps1 -InputFile DCEvents.csv
.EXAMPLE
Create, Import and force enable the WEC subscriptions
Create-Subscriptions.ps1 -InputFile <inputfile.csv> -CreateEnabled
.EXAMPLE
Create and Import the WEC subscriptions (disabled by default). Tell the server to
send existing and new events that that match the subscription
Create-Subscriptions.ps1 -InputFile DCEvents.csv -ReadExistingEvents
.EXAMPLE
Only create the WEC subscription files, do not import them.
Create-Subscriptions.ps1 -InputFile <inputfile.csv> -NoImport
Expand All @@ -40,6 +45,10 @@
.PARAMETER NoImport
Creates the subscriptions files, but does not import them
.PARAMETER ReadExistingEvents
Creates the subscriptions files and instructs the servers to send existing events that match the criteria
through to the collector.
LEGAL DISCLAIMER
This Sample Code is provided for the purpose of illustration only and is not
intended to be used in a production environment. THIS SAMPLE CODE AND ANY
Expand Down Expand Up @@ -69,7 +78,8 @@
[Parameter(Mandatory=$true)][ValidateNotNullOrEmpty()][String]$InputFile,
[Parameter(Mandatory=$false)][string]$OutputFolder=$PWD,
[Parameter(Mandatory=$false)][Switch]$CreateEnabled,
[Parameter(Mandatory=$false)][Switch]$NoImport)
[Parameter(Mandatory=$false)][Switch]$NoImport,
[Parameter(Mandatory=$false)][Switch]$ReadExistingEvents)

# Configure and Start the Windows Event Collector Services except if we are not importing.
If (!($NoImport)){
Expand Down Expand Up @@ -145,7 +155,10 @@ ForEach($Channel in $CustomChannels){
$xmlWriter.WriteCData('<QueryList><Query Id="0" Path="' + $Channel.QueryPath + '">' + $Channel.Query + '</Query></QueryList>')
$xmlWriter.WriteEndElement() # Closing Query

$xmlWriter.WriteElementString("ReadExistingEvents","True")
If (ReadExistingEvents){
$xmlWriter.WriteElementString("ReadExistingEvents","True")}
Else{
$xmlWriter.WriteElementString("ReadExistingEvents","False")}
$xmlWriter.WriteElementString("TransportName","HTTP")
$xmlWriter.WriteElementString("ContentFormat","events")
$xmlWriter.WriteStartElement("locale")
Expand Down Expand Up @@ -194,8 +207,8 @@ Else{
# SIG # Begin signature block
# MIIgVAYJKoZIhvcNAQcCoIIgRTCCIEECAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDmRTCSV+qfcL+6
# pOqLspQirwP7zaAf9qnDaQCuzmm48qCCG14wggO3MIICn6ADAgECAhAM5+DlF9hG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDtJ3gGV/S5Sv6I
# 35iCLqR59MW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CSqGSIb3DQEJBTEPFw0xNzA0MjcxMzIyNTJa
# MCMGCSqGSIb3DQEJBDEWBBQRkXykh7mEdzFeGqVMG4nSp7CClzANBgkqhkiG9w0B
# AQEFAASCAQBu6NzSTk5g3J60pRhjstfyvGYMNr9Hm19H2DsrWJr6o+5TZbIvZAGD
# IemInFkHdjVEbx08zMGr7TfpydlZ0hIrRQ4xb2DR6Xfo/krdEmXtySh4M3cviyKE
# NFGrxiPdms3nV7jp9hV3S5CN85hiIPqNJjjIiBudG7bj+5QZXeaUnoJSjLxdvHAw
# LTthTS006wAuq1Bu+7CMTt/eAfGNouL77c7yFTdaP2BELssFzPgo4M4n9wZJvsYT
# Wgvw+ucWWwe70y2bg0TBgPUf+2oCvfFoa0qEwo1Df9EbLDsZP2AWGlBsxY27ECS3
# jpOOPycPph0sudEF6unyrHsLX7uGP6Eh
# SIG # End signature block
Loading

0 comments on commit af47fc1

Please sign in to comment.