Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Teams Compatability Hack - Testing Required #48

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

latetedemelon
Copy link

Reviewed the new log location and format and hacked the previous PS script together to work with the new log version. IMO, @EBOOZ 's script is a superior soltion to other solutions out there as:

  1. Pure powershell (even the most locked down environments appear to still have Powershell locally for the most part)
  2. No admin / elevated rights required (assuming you don't use a service)

This is a very quick hack, and I have limited dev experience. I'll do my best to support changes but my skill is limited.

@latetedemelon
Copy link
Author

Pushed more changes.

@harphere
Copy link

Hi,

I came across your PR as I also am restricted by not having admin rights.
I ran your Get-TeamsStatus.ps1 on the command line to test it out and I'm finding the status never changes from 'Available'. As the script runs, I change my Teams v2 status from Available to Busy or Away but the script keeps posting 'Available' each time. I tried to see what the cause is myself but I couldn't narrow it down. It seems in the If logic for the $TeamsStatus, it always hits the first ElseIf condition after each loop and never goes to the next ElseIf when I change the Teams status.
Here's the output with PI removed:

PS C:\Scripts\MSTeams> .\Get-TeamsActivity.ps1
Latest log file: C:\Users\*\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs\MSTeams_2024-06-18_14-00-10.00.log
Successfully read the log file content.
TeamsStatus entries found: 7
TeamsActivity entries found: 9
Microsoft Teams process is running.
Status set to: Available
Activity set to: Not in a call     
Successfully updated status to Home Assistant.
Successfully updated activity to Home Assistant.
Latest log file: C:\Users\*\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs\MSTeams_2024-06-18_14-00-10.00.log
Successfully read the log file content.
TeamsStatus entries found: 7
TeamsActivity entries found: 9     
Microsoft Teams process is running.
Status set to: Available      
Activity set to: Not in a call
Latest log file: C:\Users\*\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs\MSTeams_2024-06-18_14-00-10.00.log
Successfully read the log file content.
TeamsStatus entries found: 7
TeamsActivity entries found: 9     
Microsoft Teams process is running.
Status set to: Available
Activity set to: Not in a call
Latest log file: C:\Users\*\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs\MSTeams_2024-06-18_14-00-10.00.log
Successfully read the log file content.
TeamsStatus entries found: 7
TeamsActivity entries found: 9
Microsoft Teams process is running.
Status set to: Available
Activity set to: Not in a call
Latest log file: C:\Users\*\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs\MSTeams_2024-06-18_14-00-10.00.log
Successfully read the log file content.
TeamsStatus entries found: 7
TeamsActivity entries found: 9
Microsoft Teams process is running.
Status set to: Available
Activity set to: Not in a call
Latest log file: C:\Users\*\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs\MSTeams_2024-06-18_14-00-10.00.log
Successfully read the log file content.
TeamsStatus entries found: 7
TeamsActivity entries found: 9
Microsoft Teams process is running.
Status set to: Available
Activity set to: Not in a call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants