Hi!
Complementing Andrews point, when you run a powershell/powercli, as long as you are running with the right credentials, you don't have to execute anything remotelly, you just connect to the given vcenter.
From vmware's documentation, a new-vm script is something like this:
New-VM -Name MyVM1 -Template $mySourceTemplate -Datastore $myDatastoreCluster -AdvancedOption $myAdvancedOption -ResourcePool $vmhost
but prior to that you have to connect to given vcenter using the PowerCli Connect-VIServer
Connect-VIServer -Server $vcenter -User $usr -Password $pwd
if you by any reason REALLY need to do anything from a remote server, you have to enable the remote server as a trusted host, and to create a credential string. This is pure powershell, no powercli
$originalTrusteHosts = Get-Item -Path WSMan:\localhost\Client\TrustedHosts
Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value $remoteMachine -Concatenate -Force
create the credentials
# Create Credentials
$securepw = ConvertTo-SecureString $password -asplaintext -force
$cred = new-object -typename System.Management.Automation.PSCredential -argument $user, $securepw
and finally the session
# Create and use session
$session = New-PSSession -credential $cred -ComputerName $remoteMachine