Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 231085

Script pending on Running status when schedule as task

$
0
0

Hello everyone,

 

I face this problem on every script, it's hard for me to find root cause, can some one help please? :-)

 

My script usually contains following line to load PowerCLI:

add-pssnapin VMware.VimAutomation.Core

 

Whenever I run it on PowerShell prompt window, it's working fine.

I created scheduled task to run the script daily, first several runs worked fine, but it's pending on load PowerCLI snapin after few days, no error, just pending there.

I tried create task by .ps1 file directly and by .bat, no help.

 

I tried on PowerShell 2.0 with PowerCLI 5.5 Release 1, and PowerShell 3.0 with PowerCLI 5.5 Release 2, both does not work.

It's not mentioned on PowerCLI release notes.

20140628074609.png

*****************************************************

 

My server is Windows Server 2008 R2.

 

Following is PowerShell version:

Name                           Value

----                           -----

WSManStackVersion              3.0

PSCompatibleVersions           {1.0, 2.0, 3.0}

SerializationVersion           1.1.0.1

BuildVersion                   6.2.9200.16398

PSVersion                      3.0

CLRVersion                     4.0.30319.1022

PSRemotingProtocolVersion      2.2

 

Following is PowerCLI version:

PowerCLI Version

----------------

   VMware vSphere PowerCLI 5.5 Release 2 build 1671586

---------------

Snapin Versions

---------------

   VMWare AutoDeploy PowerCLI Component 5.5 build 1598391

   VMWare ImageBuilder PowerCLI Component 5.5 build 1598391

   VMware License PowerCLI Component 5.5 build 1265954

   VMware VDS PowerCLI Component 5.5 build 1671576

   VMware vSphere PowerCLI Component 5.5 build 1671576


Viewing all articles
Browse latest Browse all 231085

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>