Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Send-MailMessage gives a strange error message

$
0
0

Hi

OS: Windows 2008R2, Hyper-V edition

I have powerShell scripts running for a long time on several Hyper-V servers. Suddenly I get this on one of the servers when Send-MailMessage is executed:

Unable to cast object of type 'System.Configuration.Internal.ConfigurationManagerInternal' to type 'System.Configuration.Internal.IConfigSystem'.
At line:1 char:17
+ Send-MailMessage <<<<
    + CategoryInfo          : NotSpecified: (:) [], InvalidCastException
    + FullyQualifiedErrorId : System.InvalidCastException

If I open af powershell prompt and just type:

    PS C:\> Send-MailMessage

I get exact the same.

Does anybody know a solution that can solve this issue?


Best regards, Brian




Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>