All,
I have a working Powershell script that will run a VBScript from within it just fine if I run it from Powershell however, if I create a schedule task in windows 2016 to run the powershell script it never runs the VBScript within it.
Does anyone know how to get the schedule task to run correctly?
Powershell code calling the vbscript:
& cscript /nologo "$env:userprofile\wuscripts\nwuemail.vbs";
Do I have to do something special to get Task Scheduler to run that line in the Powershell script? Again the powershell script runs just fine with the vbscript line by calling it from Powershell cmd.
EDIT: The Schedule task is running under the System user. This script will run on many servers and setting the administrator password for all of them would be a PITA, so would like to avoid that if possible.
Thanks for the read.
$env:userprofileas it's no longer you running it, it's the task scheduler. - BishNaboB