What is the powershell to 'add real-time chat' to a SharePoint site?

ComputerHabit 1,031 Reputation points
2023-03-30T17:42:13.51+00:00

I am creating SharePoint sites with PowerShell. I'm creating sites in specific GeoLocations and it seems that New-PnPSite is my only choice.

After creating the site with New-PnPSite I need to enable it for real-time chat in the Teams app. You know, make it show in the Teams area of the Teams app. (probably why I can't find the answer.. to many Teams references)

What is the powershell equivalent of this?
User's image

Microsoft 365 and Office SharePoint For business Windows
Windows for business Windows Server User experience PowerShell
Microsoft Teams Microsoft Teams for business Other
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 51,836 Reputation points Microsoft External Staff
    2023-03-31T07:18:59.3333333+00:00

    You could run following PowerShell.

    	
    Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
     
    $AdminCenterURL = "https://crescent-admin.sharepoint.com"
    $SiteURL = "https://crescent.sharepoint.com/sites/legal"
     
    #Get Credentials to connect
    $Cred = Get-Credential
     
    #Connect to SharePoint Online
    Connect-SPOService -Url $AdminCenterURL -Credential $Cred
     
    #Connect to Microsoft Teams
    Connect-MicrosoftTeams -Credential $Cred
     
    #Get the Site collection
    $Site = Get-SPOSite -Identity $SiteURL
     
    #Create Teams from the SharePoint Site
    New-Team -GroupId $Site.GroupId.Guid
    
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    1 person found this answer helpful.

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.