PSADHealth
PSADHealth copied to clipboard
You cannot call a method on a null-valued expression.
Hi Everyone,
I'm new to powershell. But found this tool very helpful so i'd though to test it in my lab environment. whenever i ran any built in script inside the module i'm getting below error.
You cannot call a method on a null-valued expression. At C:\Program Files\WindowsPowerShell\Modules\PSADHealth\0.0.7\PSADHealth.psm1:83 char:9
-
$msg.To.Add("$target")
-
~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression. At C:\Program Files\WindowsPowerShell\Modules\PSADHealth\0.0.7\PSADHealth.psm1:83 char:9
-
$msg.To.Add("$target")
-
~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
Send-MailMessage : A parameter cannot be found that matches parameter name 'ReplyTo'. At C:\Program Files\WindowsPowerShell\Modules\PSADHealth\0.0.7\PSADHealth.psm1:108 char:22
-
Send-MailMessage @mail
-
~~~~~
- CategoryInfo : InvalidArgument: (:) [Send-MailMessage], ParameterBindingException
- FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.SendMailMessage