AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Scheduled tasks command line8/3/2023 ![]() ![]() In this blog, we have seen how to automate a PowerShell script using Task Scheduler.What’s your preferred approach when it comes to scheduling – GUI or PowerShell? Let us know in the comments section. Office 365 users’ password expiry report.Schedule non-owner mailbox access report.Export shared mailbox permission report periodically.Schedule Office 365 users’ login history PowerShell report.Periodic report on Office 365 users’ last activity report.Schedule Dynamic Distribution Group Membership PowerShell script. ![]() Schedule Distribution Group membership PowerShell script.Schedule Office 365 users’ license report.Schedule Office 365 Mailbox Permission report.Schedule Office 365 users’ last logon time report.Periodic report of Office 365 users MFA status.Track Office 365 users’ login history – Keep audit log for more than 90 days.There are more scripts available on the internet which are scheduler friendly (Credentials can be passed as a parameter instead of saving inside the script). So that you don’t need to manually run a script on daily/Weekly/monthly basis. Using Task Scheduler, you can schedule a PowerShell script to run periodically. The saved task uses the pre-created action and trigger values that are specified by $Action and $Time variables. The above cmd saves a scheduled task with a name “Schedule MFA Status Report” in the root folder. Register-ScheduledTask -TaskName "Schedule MFA Status Report" -Trigger $Time -Action $Action -RunLevel Highest For example, I am going to schedule a script that exports Office 365 users MFA status report. In ‘ Add arguments’, -File parameter is the default one so simply specify the script path.You can find powershell.exe in your system32\WindowsPowerShell\v1.0 folder. ![]() To schedule a script, we need to select powershell.exe.
0 Comments
Read More
Leave a Reply. |