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


Support
2014-11-12T12:32:48Z
Originally Posted by: Nikolaj Pedersen 

Removing 'Write-Host' CMDLET worked - the script result is successful!
I don't wanna make a Whole script failed just because of one command.
Earlier in the post, you told me to use the 'Write-host' CMDLET.

Are you planning to fix that issue?

I'm using the WHOAMI command in a Powershell/cmd script to test user context/run as, I figured out what user is running the Powershell scirpt.
The result is:
batchServce@DOMAIN (local login+load profile - both disabled), the output is nt authority\system
batchServce@DOMAIN (local login+load profile - both enabled), the output is DOMAIN\batchService

Is this working as intended?



Sorry if I referred to Write-Host instead of Write-Output. Write-Host cannot simply be used - not supported and never will if not Microsoft changes this.

Yes, this is working as intented. You need to check Load profile so that the full profile is loaded and shown.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
cmcapellan
2016-07-08T22:22:57Z
Is this improved? I tried to use the PS Task in 8.1.2 and I got burned by the $PSScript variable not working for me, even when I used a credential. I am able to get it to work with the Execute Task as suggested above.
Support
2016-07-10T08:59:49Z
Originally Posted by: cmcapellan 

Is this improved? I tried to use the PS Task in 8.1.2 and I got burned by the $PSScript variable not working for me, even when I used a credential. I am able to get it to work with the Execute Task as suggested above.



The limitation is in the PowerShell host and it dependent on .NET. Only workaround for solving that is to use Execute Task on PowerShell.exe as you mention.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top