EBOOZ / TeamsStatus

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

Status not updating when run as a service #31

Closed m-a-johnson closed 3 years ago

m-a-johnson commented 3 years ago

Hello, I think I followed your instructions completely, but had an issue, so I looked through the other issues.

If I just run the script ".\Get-TeamStatus.ps1", it creates numerous lines which state my status, and seems to send updates to Home Assistant without issue. However, if I try running it as a service ("Start-Service -Name "Microsoft Teams Status Monitor") it doesn't update.

Would love some help! Happy to provide any logs or additional info.

I tried to see the status and it appears to be working:

PS C:\Scripts> Get-Service "Microsoft Teams Status Monitor"

Status   Name               DisplayName
------   ----               -----------
Running  Microsoft Teams... Microsoft Teams Status Monitor
m-a-johnson commented 3 years ago

So I changed the log file as per @jimmyeao and it didn't work initially. Restarted my computer, and it seems to be working! Thank you. Closing this and sorry for cluttering up your issues list.