Jump to content

SilverAnt

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by SilverAnt

  1. I'm not sure this is the correct section to post in, but I am having issues with a sample script I wrote.  In testing out the automation features of Pulseway, I wrote a script to start the PC Monitor service (because I am having issues with it not starting all of the time). Here is the script:

    Get-Service "PC Monitor" | Where {$_.status –eq 'Stopped'} |  Start-Service

    Here is the error I get in return : 

    At C:\Program 
    Files\Pulseway\automation_a5487285_b624_4996_8bc3_3440ed567e5a.ps1:1 char:47
    + ... ice "PC Monitor" | Where {$_.status ƒ?"eq 'Stopped'} |  Start-Service
    +                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The string is missing the terminator: ".
    At C:\Program 
    Files\Pulseway\automation_a5487285_b624_4996_8bc3_3440ed567e5a.ps1:1 char:45
    + ... ice "PC Monitor" | Where {$_.status ƒ?"eq 'Stopped'} |  Start-Service
    +                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Unexpected token 'ƒ?"eq 'Stopped'} |  Start-Service' in expression or 
    statement.
    At C:\Program 
    Files\Pulseway\automation_a5487285_b624_4996_8bc3_3440ed567e5a.ps1:1 char:34
    + Get-Service "PC Monitor" | Where {$_.status ƒ?"eq 'Stopped'} |  Start ...
    +                                  ~
    Missing closing '}' in statement block or type definition.
        + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordEx 
       ception
        + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

     

    It appears that the -eq is somehow being changed to f?"eq 

    Does anyone know why this is happening, or am I misinterpreting this? Any help would be appreciated.

×
×
  • Create New...