That will not work via Invoke-VMScript.
A better alternative is to use SSH (via the Posh-SSH module for example).
Something like this for example
$vmName = 'vcsa.my.domain'$user = 'root'
$pswd = 'VMware1!'
$cmd = @'
service-control --status
'@
$cred = [PSCredential]::new($user, (ConvertTo-SecureString -String $pswd -AsPlainText -Force))
$session = New-SSHSession -ComputerName $vmName -Credential $cred –AcceptKey
Invoke-SSHCommand -SSHSession $session -Command $cmd | select -ExpandProperty Output
Remove-SSHSession -SSHSession $session | Out-Null