Powershell Event - email notification / stop / restart question

Hey guys,
      I have a filesystemwatcher app running to process files to a sql and ms access database. It works fairly well. However sometimes it goes down for really no particular reason that i can tell.  So im trying to do two things if at
all possible.
1. send an email notification to our help desk if it breaks 
2. restart the register event on a random timer
Any thoughts on this one ? Been googling all morning and nothing thus far.
Thanks
Rich
Rich Thompson

Hey guys,
      I have a filesystemwatcher app running to process files to a sql and ms access database. It works fairly well. However sometimes it goes down for really no particular reason that i can tell.  So im trying to do two things if at
all possible.
1. send an email notification to our help desk if it breaks 
2. restart the register event on a random timer
Any thoughts on this one ? Been googling all morning and nothing thus far.
Thanks
Rich
Rich Thompson
Why not just fix your code.  Why would the event stop.  Events don't just stop happening unless you are doing something wrong in code.  I saw some of your original code.  You are not a programmer or a scripter and tend to make bad assumptions
and write code that is faulty.
It is not possible to know what is happening if you do not post the code.  YOU are asking for a patch to an unknown situation.  Try just asking for help fixing the broken script.
If you are trying to run a permanent monitor of files that never stops you will do better to use a WMI event because it is run by the system and does not require a user account or a process.  That is why they exist.  FSW is designed to do temporary
high efficiency monitoring.  It I generally run by a UI applications to detect when a user does something although it can be used for other things.
I have successfully run FSW for months with no issues.  We used this to load files received on a high speed FTP channel at the rate of about 6000 per hour.
Other things that you may have done to cause this failure is to just try to add this code to another very large script.  This is not a good way to deploy the FSW.  Decoupling event response from results can best be done via a WMI permanent event
subscription.
Right tool - good solution.
¯\_(ツ)_/¯

Similar Messages

  • Email Notifications stop working on all of my forms.  Help?

    Email Notifications stop working on all of my forms.  Help?

    This may be an indication that your incoming mail server has started treating all of those messages as SPAM, and is deleting them. Try setting those messages go to an outside e-mail account, submit a test submission of your form, and see what happens. It might at least help in tracking down the problem. If you find that the messages go to an outside account, work with your Postmaster to get the messages coming from FormsCentral whitelisted. It might still be something else, but this is something you can try to narrow the possibilities.
    Hope that helps,
    Brian

  • Send email notification when my question is answered by friends

    Send email notification when my question is answered by friends

    babowa wrote:
    This is not FaceBook.
    Thank goodness.....
    Could be worse. It could be Twitter

  • My friend and I share an iCal calendar through iCloud.  Until recently, we would receive email notifications if either of us made changes to or added an event to the iCal calendar.  Does anyone know why those email notifications stopped?

    My friend and I share an iCal calendar through iCloud.  Until recently, we received email notificiations anytime either of us made changes to exisiting calendar events or added new items to the calendar.  Does anyone know why these email notificiations stopped?

    iCloud was experiencing problems with this a couple of days ago, where many users with shared calendars were getting email notifications even though their iCloud settings did not select to receive them.  Perhaps when they fixed this problem it reverted your settings to not receive email notifications.  Got to iCloud and check your setting for this.  If it still look correct, try turning off email notifications, save the change, then turn them back on again and save the change again.

  • MeetingPlace Express 2.1.1.2 Email Notifications stopped working

    Hello I am encountering the following issue with Email Notification with MPE 2.1.1.2:
    I schedule a meeting and invite someone from outside of the company by email. The meeting creation works but no email is sent to the guess. When I go to the Email Notification Queue Status Report,in the Description field, I see the massage stating "New meeting scheduled. Queued for delivery" but never deliveried. Could you please let me know how can I resolve the email notification issue. Please note that the SMTP server is configured and it's working correctly.
    This was previous post I found back in October 2006, so I'm hoping that in 2010 someone knows how to fix this problem.
    https://supportforums.cisco.com/message/353918
    Thanks in advanced!

    You may have already checked these things, but it is worth asking:
    1. There is a user called "guest" in MPE.  This user account is what is tied to non-MPE users when they join meetings and is also used by MPE for notification.  In particular, the E-mail type field is used.  Set this to SMTP
    2. Ensure that there are no ACLs/firewall rules between MPE and your SMTP relay that would block access.  Yes, I know you said your SMTP relay server is working.  I am suggesting you ensure that the communication will flow freely between MPE and your SMTP relay server.
    3. If your SMTP relay server requires authorization, enable it in MPE.  If not, then disable it.  I am betting you have already done this but I am just checking.
    4. Check to see if your SMTP relay server has any local permission features that would block access from MPE.  Some relay servers differentiate between and internal (intra-company relay) and external.  Make sure that MPE can relay to external participants.
    5.  Make sure MPE uses a SMTP e-mail alias that is valid.
    6. Does SMTP relay work internally?  If you are an Exchange/Outlook shop and have configured user internal MPE user accounts and groups with E-mail type Exchange.  Change it to SMTP (for the internal entity) and test notification.
    I have seen this issue a few times and I have had people say they know SMTP is working.  Usually they stumble across the fix by going through the questions listed above.
    HTH.
    Regards,
    Bill

  • Email Notifications stopped

    Has anyone had any problems with their email notifications no longer popping up in the notification bar and not receiving the email notification tone?  Mine has stopped and all settings are correct

    I have similar problem that it's still without solution. And couple of months have passed already Check this thread https://community.spotify.com/t5/Help-Accounts-and-Subscriptions/I-Do-Not-Receive-Any-Notifications-Anywere/m-p/1124713#M149854

  • Variable text is blank in emails when using Scheduled Task to email event log notifications

    I am trying to use powershell to email notification when a user account gets locked.  I am running the script from a server 2008 domain controller.
    I have tried multiple scripts and I have the same issue every time.  The script works fine when I run it directly from the powershell command line window.
    However whenever I try running the exact same scripts from an event-triggered scheduled task, the script runs, however any content that generated from a variable is not added to the email.  It is just left blank and ignored.
    I have tried adding lots of permissions including domain administrator group membership to the account  runs the task from and it doesn't include all the expected text unless I run it from the built-in domain administrator account.
    The task runs and the email is sent, but the email is missing all the content generated by variables.
    How can this be fixed?
    Here is an example script.
    $AccountLockOutEvent = Get-EventLog -LogName "Security" -InstanceID 4740 -Newest 1
    $LockedAccount = $($AccountLockOutEvent.ReplacementStrings[0])
    $AccountLockOutEventTime = $AccountLockOutEvent.TimeGenerated
    $AccountLockOutEventMessage = $AccountLockOutEvent.Message
    $messageParameters = @{ 
    Subject = "Account Locked Out: $LockedAccount" 
    Body = "Account $LockedAccount was locked out on $AccountLockOutEventTime.`n`nEvent Details:`n`n$AccountLockOutEventMessage"
    From = "[email protected]
    To = "[email protected]
    SmtpServer = "exch2010.domain.local" 
    Send-MailMessage @messageParameters
    =================================================
    Here is an example of task settings.
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Date>2015-03-25T21:40:28.8095226</Date>
        <Author>DOMAIN\administrator</Author>
      </RegistrationInfo>
      <Triggers>
        <EventTrigger>
          <Enabled>true</Enabled>
          <Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Security"&gt;&lt;Select Path="Security"&gt;*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and EventID=4740]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
        </EventTrigger>
      </Triggers>
      <Principals>
        <Principal id="Author">
          <UserId>DOMAIN\WilliamsD</UserId>
          <LogonType>Password</LogonType>
          <RunLevel>LeastPrivilege</RunLevel>
        </Principal>
      </Principals>
      <Settings>
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>false</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
          <StopOnIdleEnd>true</StopOnIdleEnd>
          <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <WakeToRun>false</WakeToRun>
        <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
        <Priority>7</Priority>
      </Settings>
      <Actions Context="Author">
        <Exec>
          <Command>powershell.exe</Command>
          <Arguments>-nologo -File "C:\powershell\l2.ps1"</Arguments>
        </Exec>
      </Actions>
    </Task>

    By variable text I mean everything that it generates by using a variable such as the user's name ($LockedAccount)
    and everything else such as $AccountLockOutEventTime and everything else that is generated from
    a variable.
    Nothing like that appears in the email only hard coded text.
    I am not running it remotely.  I am logged directly onto the domain controller and I tried giving
    the account that is used to run the task more and more permissions including domain administrator group membership with the same result.
    When I run the exact same script on the same domain controller locally via the powershell CLI all of the info appears.
    This is the info when the email is generated by running the script directly from the powershell CLI:
    ================================================
    ================================================
    Account BondJ was locked out on 03/26/2015 20:42:18.
    Event Details:
    A user account was locked out.
    Subject:
                    Security ID:                         S-1-5-18
                    Account Name:                 DC1$
                    Account Domain:                            
    DOMAIN
                    Logon ID:                            
    0x3e7
    Account That Was Locked Out:
                    Security ID:                         S-1-5-21-3440879815-2193117124-1719501250-1154
                    Account Name:                 BondJ
    Additional Information:
                    Caller Computer Name:                DC1
    ===================================================
    ====================================================
    Below is the contents of the email when the same script runs via scheduled task trigger using any account I try other than the built-in domain Administrator account.
    =======================================================
    ======================================================
    Account  was locked out on .
    Event Details:
    ===================================================
    Just mostly blank email body with the info above.  All the important information text is missing from the email.

  • Cannot shut off email notifications

    I see I am not the first person to have stumbled onto this problem.  I turned on email notifications for a question I posted and now I am getting notifications of every single post in that forum, I have reset all of my settings to not get email notifications, but they continue to pour into my inbox.  Next stop will be trying to delete this account.  (Something tells me there is no way to do that.)
    Can someone please help me fix this issue?
    Thank you.

    jayfram,
    Your subscriptions have been reset and that should resolve the issue. There may be latent emails from your subscriptions that will come into your mailbox from your ISP.
    Have a great day

  • Email Notification issue for Provisioner (Urgent)

    Hi,
           OIM 11g R1, Selfregister  User is trying to Request One application access through " Add resource"  so email is going to  Manger,Defualt approver,and Default Provisioner.
    But then he is trying to "Modify the same resource" in request email is going to  Manger ,Defualt approver but  its not going to Default Provisioner ,Where might be the problem.
    Where i need to trouble shoot the issue.
    Thanks in Advance.
    Reddy.

    Hi Andrew,
    We haven’t had any issues since we started using Forms Central until after your site was down for maintenance a couple days ago.  That’s when the issue started for us.  I’m thinking a glitch on your end?  I actually called the day the site was down and it was confirmed that the Forms Central was in fact down and to give it 1-2 hours and check back.  The next day is when the email notifications stopped coming into our email address.  If you could check that out and let me know, then we’ll take it to the co-author step if need be.
    Thanks,
    Sue Monforte
    Kenny Mondo Productions

  • Email notification issue on E90

    Hi,
    I am using mail for exchange(version 2.9.158) on E90 (software version 300.34.84) and I use the default email notification (under settings --> General --> personalisation --> standby mode --> Active standby plugins). This show the count of unread mail in the screen. When I change my connection type in mail for exchange (I generally switch between my service provider and my WiFi connection), the default email notification disappears. I have to manually go back and enable the plugin.
    Has anybody faced this problem? Is this an issue with the software? Is there a way to fix this? Thanx

    Hi Andrew,
    We haven’t had any issues since we started using Forms Central until after your site was down for maintenance a couple days ago.  That’s when the issue started for us.  I’m thinking a glitch on your end?  I actually called the day the site was down and it was confirmed that the Forms Central was in fact down and to give it 1-2 hours and check back.  The next day is when the email notifications stopped coming into our email address.  If you could check that out and let me know, then we’ll take it to the co-author step if need be.
    Thanks,
    Sue Monforte
    Kenny Mondo Productions

  • DFM 3.2 email notifications have stopped

    Good day.
    We're running LMS 3.2 with DFM 3.2, and at some point within the last month, email notifications from DFM have stopped flowing.  DFM is trapping events as they occur and these are viewable through the portal, but notifications that should be going out as email and SMS messages have stopped.
    I can view "Notification Customization" and "Event Sets" within the LMS DFM portal (running on Windows), but...
      - accessing "Notification Groups" returns an "HTTP Status 500" error
      - accessing "SNMP Trap Notifications" returns "Problem with File /WEB-INF/screens/Notification/newtrapSubscription.jsp!!!Cannot find bean NewSubscription in scope null"
    - accessing "E-mail Configuration" --> "E-mail Notificatin" returns "Problem with File /WEB-INF/screens/Notification/NewEmailSubscription.jsp!!!Cannot find bean NewSUbscription in scope null"
    - accessing "SNMP Trap Notification"  returns "Problem with File /WEB-INF/screens/Notification/newtrapSubscription.jsp!!!Cannot find bean NewSubscription in scope null"
    Backups going back beyond when this is believed to have stopped working are available if something needs to be restored.  If that's the direction I need to go, how do I restore just the DFM portion of the database?  If backup restore is not the way to proceed, what other advice can be provided.
    Thanks.

    Never mind...I just restored the entire LMS database using a backup dated prior to when the notifications stopped.
    Problem solved.

  • Email notifications have stopped and unable to re-...

    Email notifications have stopped for 3 accounts where I need to print the bills for company records.  Despite emailing and phoning the bills are still not coming through.  I could log on to see the bills, but am no longer able to do this.  I have tried adding the accounts again but none of the 3 account numbers are recognised so cannot get the bills at all.  Can anyone help please.

    Welcome to the BT Residential forum
    As you are a business user, please could you post on the BT Business forum at http://business.forums.bt.com/
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

  • How to stop email notifications from this site??

    I signed up here a while ago because I needed some help with software on my macbook. As it happens, ever since, I´ve been receiving approximatly one hundred email a day from this forum, general replies to peoples questions here. I have NOT signed up for that, and I have checked NO on all the email notification preferances here. WHAT can be done to stop this extremely annoing email- flow to my gmail? It can´t really be supposed to be like this??
    Thanks
    Hedda, NO

    I have done this, here are screenshots of what it actually looks like
    As you see, I only have email notifications for my own two posts.. But I still recieve between 50- 100 email every day from the support communities on varoius posts and topics from other users. How can this be? If there is no other places to stop the emails, I need somebody to tell me how to leave this site all together, I can´t have my mailbox filled every day anymore, it´s very annoying.
    Please say any of you can help, do you know if there are anyone that actually runs and manages this site that can be contacted about my issue?

  • TS4000 How to stop email notifications of calendar changes

    Every time I edit an event on a shared icloud calendar it sends emails notifying me of the change.  How do I stop these?

    as i wrote there Re: How do you stop receiving notifications about updated calendar events?:
    to NOT get email notification about updated events from a shared calendar you subscribed to you have to uncheck "events affect availability" in that calendars "info" (mac os X.7 and X.8: iCal —> calendars dropdown —> right click on the subscribed calendar —> choose "get info" from the context-menu —> uncheck "events affect availability")

  • Has anyone stopped receiving email notifications on posts?

    I just noticed this morning that I am not receiving email notifications on certain posts starting sometime yesterday. I checked the posts in question and under 'Actions' in the upper right hand panel 'Stop Email Notifications' is showing as the option, so I should be receiving email updates.
    Anyone else experiencing missing notifications?

    I figured it out, my email account was gmail set to imap, when you setup imap as well as automatic retrieval the phone downloads your entire inbox, so if you have thousands of messages in your inbox like I did, the phone gets overwhelmed and stops displaying notifications on the main screen. When the went on and archived all my old mail on gmail, the problem was gone.

Maybe you are looking for

  • Oracle sql commands use

    my question is will it possible to use oracle sql commands in toad and genterate the reprot like I have below. my second question is can I embede this oralc sql command in my apps. to have the out put I have below. I tried and got an error message. I

  • Automating Generation of reports and mailing it.

    Hi, How do I automate generation of reports and mail it through the Oracle Server. The messaging system being implemented out here is Lotus Domino Server 4.6 Regards, Alka Mishra.

  • Which IOS version for 3925 fixes CSCul63961?

    Hello everybody, A little while ago we ran into CSCul63961 on one of ours 3925 routers. I know, this bug-id speaks of Cisco 1900 integrated routers series, but according to Cisco TAC engineer we've been in touch regarding some other issue we had with

  • RFC response is IT_RETURN instead of RETURN

    Hi All, I am working with Custom RFC when I am sending the request not getting any thing showing the error as "com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found". When executed in function builder SE37 working fine

  • TM backs up Aperture library over and over again!

    Ladies and Gents; I look forward to your insight how this happens. Every time I work in Aperture, Time Machine backs up the whole library file to my Time Capsule(1TB), eating space like hungry dog. My aperture library is refrenced, so the actual pict