quest powershell : how do you run scheduled task?
-
19-08-2019 - |
Question
How do you run a scheduled task with Quest powershell snap in?
Solution
You would schedule PowerShell.exe, and use one of its command-line parameters to specify the script to run. At the start of that script, add:
Add-PSSnapin Quest.ActiveRoles.ADManagement
That will load the snapin for that script, and then execute whatever else is in the script.
(BTW, this would be the case for any script that needs one or more extra snapins.)
OTHER TIPS
Another option would be to create a console file (using Export-Console - which will create a *.psc1 ) and adding -PSConsoleFile YourConsole.psc1 to your powershell.exe command line.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow