none
PowerShell- Monitor Group Of Services on 'N' Servers & Notify Stopped Services RRS feed

  • Question

  • I am getting this error while executing the script. Please provide me solution for it.

    Get-Process : A parameter cannot be found that matches parameter name 'ComputerList'.
    At G:\SQL_Team_Do_Not_Delete\Testing_1.ps1:1 char:28
    + PS G:\>ServicesStatusAlert -ComputerList G:\Servers.txt -includeServi ...
    +                            ~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Get-Process], ParameterBindingException
        + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetProcessCommand

    -To : The term '-To' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the 
    spelling of the name, or if a path was included, verify that the path is correct and try again.
    At G:\SQL_Team_Do_Not_Delete\Testing_1.ps1:2 char:1
    + -To naveen.dalal@officedepot.eu -From donotreply.com -SMTPMail relay. ...
    + ~~~
        + CategoryInfo          : ObjectNotFound: (-To:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

     
    Thursday, November 7, 2019 3:36 PM

All replies

  • Your post says that you have commands that are badly written and use parameters that are wrong. Please carefully read the error to see which commands are at issue.

    Your post tells us nothing that can help you.  You must edit your script and fix the errors in the order they are reported.

    If this is a script you have copied from somewhere then ask the author of the script to help you.


    \_(ツ)_/


    • Edited by jrv Thursday, November 7, 2019 3:58 PM
    Thursday, November 7, 2019 3:57 PM