Yes, but you will need the Posh-Ssh module.
Then you can do (replace the content of the $cmd variable with your command)
#requires -Modules posh-ssh
$cmd = 'date'
$user = 'root'
$pswd = 'VMware1!'
$pswdSec = ConvertTo-SecureString -String $pswd -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($user,$pswdSec)
Get-VMHost | ForEach-Object -Process {
if((Get-VMHostService -VMHost $_).where({$_.Key -eq 'TSM-SSH'}).Running){
$ssh = New-SSHSession -ComputerName $_.Name -Credential $cred -AcceptKey -KeepAliveInterval 5 -Verbose
Invoke-SSHCommand -SessionId $ssh.SessionId -Command $cmd -TimeOut 30
Remove-SSHSession -SessionId $ssh.SessionId
}
}