Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

invoking powershell script in remote server - running state

$
0
0

Hi all,

 

I'm facing an issue while calling a powershell script on remote server. The script runs without any issue on the target server and returns output. But while calling from vro,  the workflow is only in running state. It never ends. Below is the script which generates pdf from excel file in the specified path. Kindly help me fixing it.

 

vro version - 6.0.1

server - win 2008 R2

 

$path = “"

$xlFixedFormat = “Microsoft.Office.Interop.Excel.xlFixedFormatType” -as [type]

$excelFiles = Get-ChildItem -Path $path -include *.xls, *.xlsx -recurse

$objExcel = New-Object -ComObject excel.application

$objExcel.visible = $false

$filepath = Join-Path -Path $path -ChildPath ($excelFiles.BaseName + “.pdf”)

$workbook = $objExcel.workbooks.open($excelFiles)

$workbook.Saved = $true

echo “saving $filepath”

$workbook.ExportAsFixedFormat($xlFixedFormat::xlTypePDF, $filepath)

$objExcel.Workbooks.close()

$objExcel.Quit()

Remove-variable objExcel


Also help me troubleshooting the following error from vro, I tried running close session with instance and killed the powershell process running on the server. But issue still continues. How to troubleshoot from vro?

The WS-Management service cannot process the request. This user is allowed a maximum number of 5 concurrent shells, which has been exceeded. Close existing shells or raise the quota for this user.

 

 


Thanks,

Manu


Viewing all articles
Browse latest Browse all 6251

Trending Articles



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