Nice, clear explanation from the primalscript folks: http://www.sapien.com/blog/2006/12/20/schedule-hidden-powershell-tasks/
Bottom line as below… “wrap it in older scripting technology” From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of John J. Kavanagh Sent: Friday, January 24, 2014 9:13 am To: powershell@lists.myitforum.com Subject: RE: [powershell] Any way of running a powershell script from a scheduled task, silently? This can't be done remotely via WMI? Sent from my Windows Phone :) _____ From: Joshua Delaughter <mailto:joshua.delaugh...@gmail.com> Sent: 1/24/2014 11:56 AM To: powershell@lists.myitforum.com <mailto:powershell@lists.myitforum.com> Subject: Re: [powershell] Any way of running a powershell script from a scheduled task, silently? Powershell is the future they said... I guess the fine print said as long as you wrap it in older scripting technology :/ Sent from my iPhone On Jan 24, 2014, at 9:57 AM, <christopher.catl...@us.sogeti.com <mailto:christopher.catl...@us.sogeti.com> > wrote: Tried it, still shows the blank PS window until the script has finished running. Guess I’ll be wrapping it with a bat or cmd. Christopher Catlett Consultant | Detroit <image001.jpg> Sogeti USA Office 248-876-9738 |Fax 877.406.9647 26957 Northwestern Highway, Suite 130, Southfield, MI 48033-8456 <http://www.us.sogeti.com/> www.us.sogeti.com From: listsad...@lists.myitforum.com <mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of Marco Shaw Sent: Thursday, January 23, 2014 6:04 PM To: powershell@lists.myitforum.com <mailto:powershell@lists.myitforum.com> Subject: Re: [powershell] Any way of running a powershell script from a scheduled task, silently? Interesting... http://connect.microsoft.com/PowerShell/feedback/details/616844/powershell-windowstyle-parameter-binding-order-problem Try to flip the arguments around? On Thu, Jan 23, 2014 at 6:02 PM, <christopher.catl...@us.sogeti.com <mailto:christopher.catl...@us.sogeti.com> > wrote: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File c:\scripts\Config_Fujitsu_hkcu_reg_keys.ps1 -WindowStyle Hidden Christopher Catlett Consultant | Detroit <image001.jpg> Sogeti USA Office 248-876-9738 <tel:248-876-9738> |Fax 877.406.9647 <tel:877.406.9647> 26957 Northwestern Highway, Suite 130, Southfield, MI 48033-8456 <http://www.us.sogeti.com/> www.us.sogeti.com From: listsad...@lists.myitforum.com <mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com <mailto:listsad...@lists.myitforum.com> ] On Behalf Of Daniel Ratliff Sent: Thursday, January 23, 2014 4:42 PM To: 'powershell@lists.myitforum.com <mailto:powershell@lists.myitforum.com> '; 'powershell@lists.myitforum.com <mailto:powershell@lists.myitforum.com> ' Subject: RE: [powershell] Any way of running a powershell script from a scheduled task, silently? What's your current cmd? -Daniel Ratliff -----Original Message----- From: christopher.catl...@us.sogeti.com <mailto:christopher.catl...@us.sogeti.com> [christopher.catl...@us.sogeti.com <mailto:christopher.catl...@us.sogeti.com> ] Sent: Thursday, January 23, 2014 03:34 PM Eastern Standard Time To: powershell@lists.myitforum.com <mailto:powershell@lists.myitforum.com> Subject: [powershell] Any way of running a powershell script from a scheduled task, silently? I am running a script regularly to set some user settings, if it sees a particular piece of hardware present on the system. I’ve tried the “–WindowStyle Hidden” and the “-NonInteractive” switches and they do not hide the powershell dialog. A blank, blue window, is shown. I’d really rather not have to wrap it inside a batch or vbscript. This is a script running on Win8.1 machines, so v4 is available. Christopher Catlett Consultant | Detroit <image001.jpg> Sogeti USA Office 248-876-9738 <tel:248-876-9738> |Fax 877.406.9647 <tel:877.406.9647> 26957 Northwestern Highway, Suite 130, Southfield, MI 48033-8456 <http://www.us.sogeti.com/> www.us.sogeti.com ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1 The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information. ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1