I’ve a script working below an Azure Automation account. The script connects to the Workplace 365 endpoint (https://outlook.workplace365.com/powershell-liveid/), and makes use of Set-Contact to replace some contact data for 5000 contacts (I inherited this so please do not ask :)). The script is working for simply over 57 minutes.
The problems I’m now beginning to get is that 2000 contacts are being up to date, then I get the next errors within the logs:
Beginning a command on the distant server failed with the next error message : The I/O operation has been aborted due to both a thread exit or an software request. For extra data, see the about_Remote_Troubleshooting Assist matter.
I get this as soon as, then I get:
Exception calling "GetSteppablePipeline" with "1" argument(s): "Exception calling "PromptForCredential" with "4" argument(s): "A command that prompts the consumer failed as a result of the host program or the command sort doesn't help consumer interplay. The host was making an attempt to request affirmation with the next message: Enter your credentials for https://outlook.workplace365.com/powershell-liveid/.""
The instructions getting used to attach are (nothign sophisticated):
$a = New-PSSession -ConfigurationName Microsoft.Alternate -ConnectionUri 'https://outlook.workplace365.com/powershell-liveid/' -Credential $Credential -Authentication Primary -AllowRedirection -Erroraction Cease Import-PSSession -Session $s -CommandName New-MailContact, Set-Contact, Take away-MailContact -AllowClobber | Out-Null
What it appears like is the distant session is re-requesting login. If that’s the case I am questioning below what circumstances it could do this (for instance does the session have a set time after which asks for authentication).
Can anyone shed any mild on why that is occurring and what I can do to resolve it?