From monthly archives: February 2014

We are pleased to present below all posts archived in 'February 2014'. If you still can't find what you are looking for, try using the search box.

Timothy

It's Not That Complicated: PowerShell and Task Scheduler

There is no end to complicated methods on the internet regarding the proper way to schedule a PowerShell task.  You see all manner of command line switches and escape sequences.  It's not that complicated!  Your task is powershell.exe and your argument is the path to the script.  If you need to quote the path because it contains spaces, use a combination of single and double quotes to parameterize the argument and then quote the path within the parameter.  When you do this, you also need to remember to precede the inner quote with an ampersand so PowerShell treats it as a script to execute and not just an output string.  It sounds more complicated than it actually is.

Examples:

powershell.exe c:\tasks\mycoolscript.ps1

powershell.exe "& 'c:\my path\with spaces\mycoolscript.ps1'"

Recent Comments
  1. Re: RD Tabs: Increased Memory Consumption with 2012+ Servers and Error 3334
    Mano: Happy wednesday wishes images wednesday sms wednesday pictures Happy wednesday wishes happy wednesday...
  2. Re: RD Tabs: Increased Memory Consumption with 2012+ Servers and Error 3334
    Mano: Happy wednesday wishes images wednesday sms wednesday pictures Happy wednesday wishes happy wednesday...
  3. Re: RD Tabs: Increased Memory Consumption with 2012+ Servers and Error 3334
    Mano: Happy wednesday wishes images wednesday sms wednesday pictures Happy wednesday wishes happy wednesday...
  4. Re: RD Tabs: Increased Memory Consumption with 2012+ Servers and Error 3334
    Mano: Happy wednesday wishes images wednesday sms wednesday pictures Happy wednesday wishes happy wednesday...
  5. Re: RD Tabs: Increased Memory Consumption with 2012+ Servers and Error 3334
    Mano: Happy wednesday wishes images wednesday sms wednesday pictures Happy wednesday wishes happy wednesday...
  6. Re: In VB.Net, sending output to the console from a Windows "Forms" application
    clochardM33: Glorious
  7. Re: DPM 2016 + SQL 2016 and "An unexpected error occurred during the installation" ID: 4387
    Andreas Hagberg: Edward, you are the man. It solved the problem right at the first try. Many thanks for the post.
  8. Re: DPM 2016 + SQL 2016 and "An unexpected error occurred during the installation" ID: 4387
    Andreas Hagberg: Edward, you are the man. It solved the problem right at the first try. Many thanks for the post.
  9. Re: DPM 2016 + SQL 2016 and "An unexpected error occurred during the installation" ID: 4387
    Andreas Hagberg: Edward, you are the man. It solved the problem right at the first try. Many thanks for the post.
  10. Re: DPM 2016 + SQL 2016 and "An unexpected error occurred during the installation" ID: 4387
    Derek: Edward, great find. +1 on the fix... Thanks!!