I have reviewed the GitBook and the two blog articles (original and v2) about remoting with SPE, but I've not been successful in executing any commands.
Here's an example script I've been trying to get to work:
$session = New-ScriptSession -Username admin -Password b -ConnectionUri http://local.sitecore
Invoke-RemoteScript -Session $session -ScriptBlock { Get-Item "master:\content\Home" }
Stop-ScriptSession -Session $session
The script runs without an error, but no text is output.
Things I've tried:
- I have run this same script (
Get-Item "master:\content\Home"
) in the PowerShell Console inside SPE in Sitecore and I get a result. - I have changed the
-ConnectionUri
to gibberish and confirmed that I do get an error if the URL is incorrect (New-WebServiceProxy : The remote name could not be resolved
). - I have changed the username and password, too, but I do not receive an error if they are incorrect.
- I have run
Invoke-RemoteScript
without a session object (passing in the session parameters to that command) and also do not get an output.
I feel like I'm missing something simple. Anyone have any ideas?