Dear community,
We want to clean-up some inactive devices in our teamviewer management console. Previously we used the follow powershell script:
But I've noticed that the script stopped working since a few months. When I try to run this script manually with the following parameters I'll get a error as show below:
Parameters:
-ApiToken 'OURAPITOKEN' -ExpiryInterval -Days '90' -Force
Error:
Remove-TeamViewerOutdatedDevice : You cannot call a method on a null-valued expression.
At C:\_Beheer\Scripts\TeamViewerOutdatedDevice.ps1:177 char:5
+ Remove-TeamViewerOutdatedDevice -accessToken $ApiToken -expiryDat ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Remove-TeamViewerOutdatedDevice], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull,Remove-TeamViewerOutdatedDevice
Any suggestions?
Kind regards,
GaarEnSappig