Skip to content

Bookmarking doesnt seem to work as expected #2

@kayasax

Description

@kayasax

Hi Jessica, thank you very much for your blog and this repo, I've dicovered them 2 days ago and learned a lot of new things!

I'm trying to use weffles to send an email alert when a user is added to some admin groups .

Event forwarding is working, the eventwatcher is in place, the email is fire when the groups get modified ... but when I stop/restart the schedule task I'm receiving emails for events that were already processed !

I was thinking we have to update the bookmark in the action block of the register-eventRecordWrittenEvent , so I tried this :

import-module "c:\weffles\EventLogWatcher.psm1"
$EventBookmark=$EventRecord.Bookmark
Export-SerializedStream $EventBookmark "c:\weffles\bookmark.stream"

but doesnt seem to work neither :(

Do you have any help to offer on this subject please ?

BTW I think there is some things missing in your script : the hashtable you create for specific events are never used ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions