Hi all,
im having some issues with firing up a script saved on a remote machine from my PC.
the script will finish customizing a freshly cloned VM (Remote Desktop Session-Host).
i have the MasterScript on my PC and all SubScripts are located on the remote server.
so i run this (the workflow is a mock-up just to show there is a workflow in use):
workflow customize { foreach -parallel ($VM in $VMs) InlineScript { Invoke-VMScript -VM $T_VMNewName -ScriptText 'C:\Scripts\AddToBroker.ps1' -GuestCredential $Credentials_Domain } }
but i cant get it to work with domain admin creds so the script fails…
so i try this (in the workflow):
$session = New-PSSession -ComputerName $T_VMNewName -Credential $Credentials_Domain Invoke-Command -Session $session -command {"C:\Scripts\AddToBroker.ps1"}
but i get: The RD Connection Broker server is not available. Verify that you can connect to the RD Connection Broker server.
if i run the script locally on the remote machine - it works booli (that mean perfect)
any tips would be appreciated
thanks
Sean