Sign-out from New MS-Teams script

Prabhjot Singh 255 Reputation points
2024-10-15T11:59:04.64+00:00

Hi Team,

Is there a way to sign-out from new Microsoft teams using PowerShell script? If yes, it will be very helpful. If no, then any alternative to way to signout user other than Manual sign-out.

Thanks!

Microsoft Teams | Development
Microsoft Teams | Microsoft Teams for business | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Nivedipa-MSFT 3,646 Reputation points Microsoft External Staff Moderator
    2024-10-16T14:08:21.8533333+00:00

    @Prabhjot Singh -
    Could you please try the below scripts?

    # Stop the Teams process
    Stop-Process -Name Teams -Force
    
    # Remove Teams cache
    Remove-Item -Path "$env:APPDATA\Microsoft\Teams" -Recurse -Force
    
    # Remove Teams credentials from Windows Credential Manager
    cmdkey /delete:MicrosoftAccount:******@domain.com
    

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.