Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Powershell- Exchange Online session not lasting more then 2 minutes with Proxy Option

$
0
0

Hi,

    My exchangeonline session is not longing more then 2 minutes.. I created a session as follows

PS C:\>$sessionOpts=New-PSSessionOption -ProxyAccessType AutoDetect -IdleTimeout 3600000 -OpenTimeout 0

and then created a session as 

PS C:\>$session =New-PSSession -Credential <credentials> -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Authentication Basic -AllowRedirection -SessionOption $sessionOpts

After establishing the exchange online session, i was able to import-pssession module. After that if i run any cmdlet like get-mailbox, get-mailuser, i will be getting a window to enter credentials.. when i check the $session it results the following

 Id  Name            ComputerName    State         ConfigurationName     Availability
 --   ----                     ------------           -----         -----------------                     ------------
  1  Session1        pod51053psh.... Broken        Microsoft.Exchange            None

Though i kept idle timeout for 1 hour.

please find the screenshots of the issue. 

A pop window came up after 2 mins of idle. 

Is it a known scenario or not? What is the way of making the session last for more then 10 mins. Please let me know if any furthur information required.

Thanks,

satya


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>