EBOOZ / TeamsStatus

Monitoring your Microsoft Teams status with PowerShell
202 stars 40 forks source link

Problems changing status with script to HA #32

Closed olthofja closed 3 years ago

olthofja commented 3 years ago

The status in HA is not changing when chaning the status of my MSTeams session. Although there are parts of the script which is working the actual automatically changing of the status is not working.

When i close MSTeams from the statusbar the status in HA is updated to Offline. When i launch the script with the SetStatus argument it is working .\Get-TeamsStatus.ps1 -SetStatus "Beschikbaar"

I tried to figure out where it goes work but am not able to. I saw when running parts of the script with Powershell ISE that the variable $TeamsProcess get's a value from the "Get-Process - Name Teams" part. But when i check ($null -ne $TeamsProcess) then it looks like it is empty.

I did change the vallues in the settings.ps1 file to dutch terminology like i find in the log.txt from Teams.

Are you able to help me out with this?

Thank you!

olthofja commented 3 years ago

Already fixed,

After changing $env:APPDATA"\Microsoft\Teams\logs.txt to "C:\Users\$UserName\AppData\Roaming\Microsoft\Teams\logs.txt" it works.