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

Difference between PowerShell Console and PowerShell ISE

From Differences between the ISE and PowerShell console:- Limited support for interactive console apps, try cmd.exe, then try cmd.exe /k a) cmd.exe /c dir still works though, and more information is available here http://blogs.msdn.com/powershell/archive/2009/02/04/console-application-non-support-in-the-ise.aspx Console Application output is not colorful STA by default a) Try $host.Runspace.ApartmentState b) powershell is MTA by default (ApartmentState shows up … Read more