December 2013
Intermediate to advanced
1872 pages
153h 31m
English
From time to time, it may be useful to have a method to schedule PowerShell scripts and have them run automatically (when the SQL Server Agent isn’t available locally, for example). The key to scheduling PowerShell scripts is the ability to call PowerShell and have it run the related scripts. There are a number of ways to accomplish this. One way is to call the powershell.exe with the -Command parameter. You can easily view the help related to this method by simply typing powershell.exe /? from a PowerShell session, as shown here:
PS>powershell.exe /?...PowerShell -Command "& {Get-EventLog -LogName security}"...
Only a small section of the text displayed is shown in this example. The powershell.exe ...