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):
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)
Bear in mind that when you remote into a machine, you (a) don't get a full interactive user session and (b) can't delegate your credentials from the remote machine to anyplace else, unless you've taken extra configuration steps. It's likely you're running into one or both of these things. Either the script you're trying to run _needs_ a full interactive user session for something it's doing, or it needs to connect to some network service that's demanding a security token, and your delegated token can't be delegated any further.
"Secrets of PowerShell Remoting" (free on our ebooks menu) discusses that latter, 'second hop' problem. I don't know if the RD Session Broker can be configured to accept CredSSP, for example, so it's possible you're S.O.L. (That means "not lucky") in terms of executing this the way you are.