Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


gsimmons31
2013-02-01T22:36:36Z
I have a Powershell task that has been running for a week or so now. The task simply calls a script. The script runs openfiles.exe to get a list of open files on a share and then disconnects certain ones if they are open. This had been running well until a few days ago.

On Jan. 31 the job started failing with an exception: ERROR: Access is denied. I finally had some time to troubleshoot it a bit this morning. I could not get it working again so I added a Start-Transcript and Stop-Transcript to the script in desperation. With those commands in the script the job fails with the message, "This host does not support transcription".

I find this very odd as that message is usually related to trying to start a transcript in the Powershell ISE. Since the GUI for a Powershell task only let you choose "Powershell" I am not sure how Powershell is being run behind the scenes.

I finally had to revert to an Execute task that runs the Powershell.exe with some parameters (the script name being one). This is working fine.

Any ideas?
Sponsor
Forum information
KJDavie
2013-02-04T00:25:16Z
Hi,

Not sure if it helps you but we have had some Powershell (PS) issues in this timeframe:

1) Issue 1 was around the .net version changes for the latest VisualCron versions.

VC6 (.1.7 & .1.8) is now using .net 4 Framework

PS 2 will use .net 3.51 Framework
PS 3 will use .net 4 Framework

Google is your friend but this link covers some of the issues we are dealing with :
http://stackoverflow.com...l-with-the-net-4-runtime 

So we have had issues with some previously working Powershell (PS 2 installed trying to use .net 3.51) erroring now when run from within VisualCron (using .net 4), but being ok outside. You can only have one framework at a time . . . . and Powershell is being called from the VisualCron Executable ?

That sounds different to you as inline powershell (Powershell Script Text) is erroring, but calling a script (Powershell File) is OK for you ?

Once we upgraded to PS 3 (on our test server only when trouble shooting, not production yet) those scripts are better behaved (so that both VC and Powershell were trying to use the same Framework).

For us this does not occur with all scripts, depends if you are using .net features (WMI) in your scripts (also for us for example connecting using the VCAPI.dll loaded with Reflection.Assembly to retrieve variable values).

2) Issue 2 was around Security / Access issues from Powershell within VisualCron (as opposed to running a standalone powershell script).

http://www.visualcron.co....aspx?g=posts&t=2868 

Where we are encountering these issues we are running Powershell scripts as a Process > Execute task with a small .cmd wrapper that just calls Powershell.exe with the Powershell Script to run in the command line rather than as a Process > Powershell Task.

Our errors at times would certainly fit your 'odd' description.

Good Luck
Scroll to Top