Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Scheduling a task with powershell

$
0
0

Good morning,

I have a powershell command that I want to schedule to run on Mondays and send an email to my email group, can someone assist me or provide a good resource to help out.

The command is to search for uses who have been inactive for 30 days.

Search-ADAccount -UsersOnly -AccountInactive -TimeSpan 30.00:00:00 | Where {$_.Enabled} | Sort Name | Get-ADUser -Prop DisplayName | Select Name,DisplayName | Out-File users.txt


Chad


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>