Search code examples
powershellsendmailoptional-parameters

Powershell Send-MailMessage InlineAttachments parameter cannot be found


I don't know why this parameter can't be found, but for some reason when using the example from David Wyatt on the Technet Gallery Powershell is kicking back the error:

Send-MailMessage : A parameter cannot be found that matches parameter name 'InlineAttachments'.

I'm not using an old Powershell version or server, it is on a Windows Server 2012 R2 with PS versions of:

PS SQLSERVER:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.42000
BuildVersion                   6.3.9600.17090
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2

Solution

  • You need to download and install the Send-MailMessage cmdlet from the TechNet link you provided. The native version of Send-MailMessage does not have the InlineAttachments parameter.