Skip to content

Instantly share code, notes, and snippets.

@tugberkugurlu
Created January 7, 2014 13:17
Show Gist options
  • Save tugberkugurlu/8299142 to your computer and use it in GitHub Desktop.
Save tugberkugurlu/8299142 to your computer and use it in GitHub Desktop.
Invoking a PowerShell script from Windows Scheduler silently. This won't bring up the PowerShell console while the script is running.
command = "powershell.exe -nologo -command D:\scripts\backup.ps1"
set shell = CreateObject("WScript.Shell")
shell.Run command,0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment