Powershell: Set a Scheduled Task to run when user isn’t logged in

I’m not a fan of embedding my credentials into a script (which a few other example here do) and additionally, you generally can’t do this from something like Packer or some other system/configuration automation or in a cloud provider with an pseudo-randomly generated password. Plus, generally, I feel hardcoding your credentials into a script or … Read more

Why is this process crashing as soon as it is launched?

I ended up opening a case with Microsoft, and this is the information I was given: Process.Start internally calls CreateProcessWithLogonW(CPLW) when credentials are specified. CreateProcessWithLogonW cannot be called from a Windows Service Environment (such as an IIS WCF service). It can only be called from an Interactive Process (an application launched by a user who … Read more