PSRemote Parameter set cannot be resolved error

While using New-PSSession and Invoke-Command to execute cmdlets on remote machines you may receive following error message:

Invoke-Command : Parameter set cannot be resolved using the specified named parameters.

If you are using –authentication parameter twice, this causes above error message. Using authentication parameter within New-PsSession would be enough

$session =  New-PSSession -Credential $credential -ComputerName “XXX” -Authentication CredSSP

Invoke-Command -Session $session -Authentication CredSSP -ScriptBlock {SCRIPT BLOCK}

remove authentication from Invoke-Command line.