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

Trigger Teams Installer for User After Machine Wide Installer-SysManSquad | Systems Management Squad #22

Open
utterances-bot opened this issue Jul 30, 2023 · 1 comment

Comments

@utterances-bot
Copy link

Trigger Teams Installer for User After Machine Wide Installer-SysManSquad | Systems Management Squad

A community blog and subsidiary of WinAdmins.io

https://sysmansquad.com/2021/01/26/trigger-teams-installer-for-user-after-machine-wide-installer/

Copy link

AlSuds commented Jul 30, 2023

This helped me greatly. Thank you so much. Learnt something very valuable today.
Without this a reboot would be needed = unhappy users. You saved me some real headaches.
Paying it back (hopefully):
When we are offboarding a Customer's computers it is useful to search-and-destroy any Scheduled Tasks created by our MSP - so I use the 'Author' field.
But to insert 'Author' we cannot use Action, Description, Settings, etc. - we can only do it after the New-ScheduledTask @Splat. Here's where I added it within your script:
$ScheduledTask = New-ScheduledTask @newScheduledTaskSplat
$ScheduledTask.Author = "My_MSP" # adds the Author field, if wanted
$ScheduledTask.Settings.DeleteExpiredTaskAfter = "PT0S"
Even though the Scheduled Task is automatically removed in the Teams case, I hope you might find the 'Add Author' step useful for any permanent/long-term Scheduled Tasks you might have to manage.

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

No branches or pull requests

2 participants