Invoke-Command -ScriptBlock skype server

Elazara Arbiv 161 Reputation points
2020-11-03T08:07:57.11+00:00

hello,
I want to run skype commands from my local computer on a skype server
I'm running the following command :

Invoke-Command -ScriptBlock {get-csuser usertest } -ComputerName serverskype01

but i get an error :
"Active Directory error "-2147016672" occurred while searching for domain controllers in domain"
36908-snip-20201103100711.png

Skype for Business
Skype for Business
A Microsoft communications service that provides communications capabilities across presence, instant messaging, audio/video calling, and an online meeting experience that includes audio, video, and web conferencing.
622 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sharon Zhao-MSFT 25,096 Reputation points Microsoft Vendor
    2020-11-04T02:27:12.783+00:00

    @Elazara Arbiv ,

    You can try to execute the commands as the below format:

    Invoke-Command -ComputerName computerA -ScriptBlock  
     {   
    $s = New-CsOnlineSession -Credential (Get-Credential)  
    Import-PSSession $s  
    #do your commands  
    }  
    

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.