none
Credential Prompt on Powershell Session after 2 minutes of connecting RRS feed

  • Question

  • Hi there, 

    Im trying to set up policies on Skype online through Powershell. I can connect just fine and run all the commands I want against Skype Online, but after around 2 minutes, I get this credential prompt as I try to run another command -  

    Its really annoying! I've tried changing the WINRM service settings by changing the service to start manually, and running WINRM quickconfig. Ive tried changing the execution policy etc.. but still, this error is showing. If I re-enter my credentials, I get this error message - 

    New-PSSession : [admingb1.online.lync.com] Connecting to remote server admingb1.online.lync.com failed with the following error message : The WinRM client cannot process the
    request. The authentication mechanism requested by the client is not supported by the server or unencrypted traffic is disabled in the service configuration. Verify the
    unencrypted traffic setting in the service configuration or specify one of the authentication mechanisms supported by the server.  To use Kerberos, specify the computer name as
    the remote destination. Also verify that the client computer and the destination computer are joined to a domain. To use Basic, specify the computer name as the remote
    destination, specify Basic authentication and provide user name and password. Possible authentication mechanisms reported by server: For more information, see the
    about_Remote_Troubleshooting Help topic.
    At C:\Users\user\AppData\Local\Temp\tmp_epvvzlco.pxx\tmp_epvvzlco.pxx.psm1:136 char:17
    +                 & $script:NewPSSession `
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
        + FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed
    Exception calling "GetSteppablePipeline" with "1" argument(s): "No session has been associated with this implicit remoting module."
    At C:\Users\user\AppData\Local\Temp\tmp_epvvzlco.pxx\tmp_epvvzlco.pxx.psm1:9093 char:13
    +             $steppablePipeline = $scriptCmd.GetSteppablePipeline($myI ...
    +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
        + FullyQualifiedErrorId : RuntimeException

    Anyone seen this error before?

    Thanks.



    Wednesday, August 7, 2019 2:19 PM

Answers

All replies

  • You probably have some network appliance terminating the connection at the specified timespan. That, or you're just incredibly unlucky :) We can certainly get disconnected form a remote PS session, but I've never had it happen with a 2 minutes cadence.
    Wednesday, August 7, 2019 5:31 PM
  • Hi rundownbassman92,

    Which commands did you run?

    In my experience, usually it could use the following commands to connect to Skype for Business online.

    Import-Module SkypeOnlineConnector

    $userCredential = Get-Credential

    $sfbSession = New-CsOnlineSession -Credential $userCredential

    Import-PSSession $sfbSession

    https://docs.microsoft.com/en-us/office365/enterprise/powershell/manage-skype-for-business-online-with-office-365-powershell

    In my lab, it works.

    Please try another machine, and change the PowerShell X86/X64 version.

    In addition, check if there is any proxy configuration that may cause this.


    Best Regards,
    Shaw Lu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Thursday, August 8, 2019 6:06 AM
    Moderator
  • Hi there, 

    Correct yes, these are the commands that I use to start a remote PS session to Skype Online. Just tried another machine, same thing... Also tried the 32 bit Powershell, I can stay logged in a little longer, but still I get kicked out.

    Thursday, August 8, 2019 8:04 AM
  • Hi,

    It seems happen on multiple machines.

    I think you may check your network configuration (proxy, firewall).

    If you use proxy, you may try to bypass it to see if it helps.

    In addition, try to connect to other Online services (Exchange online or Azure Online) to check the results.


    Best Regards,
    Shaw Lu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Monday, August 12, 2019 9:43 AM
    Moderator
  • Hi,

    Is there any update on this case?

    Please feel free to drop us a note if there is any update.

    Have a nice day!


    Best Regards,
    Shaw Lu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Wednesday, August 14, 2019 8:48 AM
    Moderator
  • Hi, yes it seems to be working on a conventional non domain joined machine. Exchange and SharePoint are both fine. Could it be the firewall?

    Thanks,

    Aled.

    Wednesday, August 14, 2019 9:01 AM
  • Hi,

    If it works on non-domain joined machine, maybe it is related to policy.

    Also firewall is an option, please check the allowed IP ranges:

    https://docs.microsoft.com/en-us/office365/enterprise/urls-and-ip-address-ranges


    Best Regards,
    Shaw Lu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Wednesday, August 14, 2019 9:33 AM
    Moderator