I am trying to run Sitecore powershell script remotely using below script

Import-Module -Name SPE

$session = New-ScriptSession -Username $userName -Password $password -ConnectionUri $uri 
Invoke-RemoteScript -Session $session -ScriptBlock {
 Get-User -id admin 
Stop-ScriptSession -Session $session

It was working fine in earlier versions of sitecore. but i am getting below error in Sitecore 9.0 update 1 version in PAAS architecture.

Exception calling "DisposeScriptSession" with "3" argument(s): "The request failed with the error message:
"<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="https://uri">here</a></body>

Let me know if anyone has faced and resolved this issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.