Tag: o365

  • Completely delete teams on a Mac

    If teams is acting up sometimes (read: almost always) the only way to stop it is by deleting it completely. Microsoft has an answer on Microsoft answers on how to do it, I put it into a script. Here it is.

    This might not be absolutely everything though, cause it still remembered my account which I used last time.

    #!/usr/bin/env bash
    
    # source: microsoft
    # https://answers.microsoft.com/en-us/msteams/forum/all/how-to-completely-remove-teams-from-mac/2499239d-d491-43cb-a9c1-acbee7223b8d
    
    
    # $1 - full path to file / dir to delete
    delete_teams_file() {
        DELETE_ME=$1
        if [[ -d $1 ]] ; then
            echo -n "DELETE      $DELETE_ME ... "
            rm -rf "$DELETE_ME"
            echo "done."
        else
            echo "Not found - $DELETE_ME"
        fi
    }
    
    set -euo pipefail
    
    # prepare sudo entry
    echo "Prepare sudo ..."
    sudo echo "sudo prep successful :)"
    
    DELETE_BASE="$HOME/Library/Caches/com.microsoft."
    for DELETE_DIR in teams teams.shipit ; do
        delete_teams_file "${DELETE_BASE}${DELETE_DIR}"
    done
    
    DELETE_BASE="$HOME/Library/Application Support/Microsoft/Teams"
    delete_teams_file "$DELETE_BASE"
    
    sudo rm -rf "/Applications/Microsoft Teams.app"
    
    echo "All done."
    
  • Powershell, O365 & Teams PSTN calling

    Unfortunately you need a Windows system to administer Office 365 with PowerShell. It’s only API calls, but it’s not (yet, hopefully) migrated to .NET Core. So Mac & Linux users are out of luck, although .NET Core should be more than capable to do this.

    Anyhow.

    If you want to administer Teams with PowerShell, you … are in trouble. It’s barely documented, and it sucks. Those are the steps to be done:

    > $sess = New-CsOnlineSession ...
    > Import-Module SkypeOnlineConnector ...
    > Import-PSSession $sess
    

    … and this should be it. Now all the PowerShell commands for Teams (in my case: Grant-CsTeamsUpgradePolicy) should be available.