Removes TeamViewer devices that didn't appear online for a given time.
The script fetches a list of TeamViewer devices of the TeamViewer company that corresponds to a given API token. The list will be filtered by devices being offline for a certain amount of time. These devices will be removed. The expiration can either be specified by a specific date or by interval.
This script requires the TeamViewerPS powershell module to be installed.
Install-Module TeamViewerPS.\Remove-TeamViewerOutdatedDevice -ExpiryDate 2018-12-18 -WhatIf.\Remove-TeamViewerOutdatedDevice -ExpiryDate '2018-12-17T17:00:00' -WhatIf.\Remove-TeamViewerOutdatedDevice -ExpiryInterval -Days 10 -WhatIf.\Remove-TeamViewerOutdatedDevice -ExpiryInterval -Days 30.\Remove-TeamViewerOutdatedDevice -ExpiryInterval -Hours 12 -ForceTo get further help about the script and its parameters, execute the
Get-Help PowerShell cmdlet:
Get-Help -Detailed .\Remove-TeamViewerOutdatedDevice.ps1