Answered by:
Connect to Skype for Business online from remoting powershell machine

Question
-
Hi everyone,
I'm trying to connect my to remote powershell machine and then connects to Skype online tenant. But I have got the error.
My scenario is:
ComputerA: on this I can run PowerShell commands to establish the connection to Skype tenant.
ComputerB: on this machine, I connect remotely to PowerShell on ComputerA and run PowerShell command to connect to Skype tenant but got the error:
Failed to connect live id servers. Make sure proxy is enabled or machine has network connection to live id servers.
If I try 1 more times, this error appears:
Exception of type 'Microsoft.LiveID.IDCRL.IDCRLException' was thrown.
The problem here is, I can establish the connection directly on ComputerA, but with remotely commands could not.
Do you have any idea? I try my best :(
Tuesday, August 2, 2016 3:56 AM
Answers
-
Hi Alice,
It's not related to the network or DNS resolution.
I tried again with powershell on Windows Server 2012 and it works fine.
Thank you so much for your help :)
Regards,
Phat
- Proposed as answer by Alice-Wang Thursday, August 11, 2016 8:36 AM
- Marked as answer by Alice-Wang Friday, August 19, 2016 10:18 AM
Thursday, August 11, 2016 7:19 AM
All replies
-
Hi
Have you tried to wrap your commands in a scriptblock?
Invoke-Command -ComputerName computerA -ScriptBlock { ` $s = New-CsOnlineSession -Credential (Get-Credential)` Import-PSSession $s` #do your commands }
To pass variables into the script use the -ArgumentList parameter
thanks
Note: Please remember to `Mark as Answered` a post that answers your question and/or `Vote as Helpful` posts that have helped you. This will help others find answers to similar problems. For more Skype for Business help visit: http://www.skype4b.uk Please note that answers are based on my experience and opinion only and do not necessarily represent the views of my employer.
Tuesday, August 2, 2016 8:01 AM -
Hi TRAN BUU PHAT,
Please run the command Get-Service "msoidsvc" in windows powershell to verify if Microsoft Online Services Sign-in Assistant is running.
About the error message you received, here is an article for your reference:
https://technet.microsoft.com/en-us/library/dn362811%28v=ocs.15%29.aspx?f=255&MSPPError=-2147217396
Since the issue is about SFB online, it would be best that you post your query in the forum link mentioned below. You would receive better suggestions in that forum. Let us know if you need any further information. We’ll be glad to help.
https://social.technet.microsoft.com/Forums/office/en-us/home?forum=officeitpro
Best regards,
Alice Wang
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.
Alice Wang
TechNet Community SupportWednesday, August 3, 2016 9:15 AM -
Hi Mark,
As I know, that is used for single command but I want to connect completely to shell console and run my commands.
I used this command:
Enter-PSSession
-ComputerName dc1tomct1v -Credential hellacn\tranph4Thursday, August 4, 2016 10:57 AM -
Hi Alice,
I tried already the command Get-Service "msoidsvc" , the service is running properly.
I also found the article you gave me above, it does not help.
Here are what I did
On Computer B:
Enter-PSSession
-ComputerName computerA -Credential domainname\usernameAnd then, I execute the commands to login to Skype Online:
$credential = Get-Credential username@domainname
$session = New-CsOnlineSession -Credential $credential
Import-PSSession $session
And I got the error message as above.
Note: on computerA, I can execute the commands to connect to Skype Online without any problems.
Thursday, August 4, 2016 11:03 AM -
Hi TRAN BUU PHAT,
Please try to make sure your firewall has connectivity granted for Office 365 authentication and identity.
For details, please refer to
Best regards,
Alice Wang
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.
Alice Wang
TechNet Community SupportSaturday, August 6, 2016 3:36 AM -
Hi Alice,
It's not related to the network or DNS resolution.
I tried again with powershell on Windows Server 2012 and it works fine.
Thank you so much for your help :)
Regards,
Phat
- Proposed as answer by Alice-Wang Thursday, August 11, 2016 8:36 AM
- Marked as answer by Alice-Wang Friday, August 19, 2016 10:18 AM
Thursday, August 11, 2016 7:19 AM -
Hi TRAN BUU PATH,
I am glad to hear that your issue has been resolved, and thanks for your sharing.
If your any other question, welcome to post in our forum
Best regards,
Alice Wang
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.
Alice Wang
TechNet Community SupportThursday, August 11, 2016 8:38 AM