Last active
January 23, 2021 15:07
-
-
Save MatthewJDavis/99f0313f3e89b953e0e841aa0a8ea0c1 to your computer and use it in GitHub Desktop.
Timed action with PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run a PowerShell command on a specific interval. | |
| $Timer = [System.Timers.Timer]::new(3000) | |
| Register-ObjectEvent -InputObject $Timer -EventName Elapsed -Action { Get-Item } | |
| $Timer.Start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment