I have to generate an Excel sheet populated with some users informations. It works on the server itself, but not when i run it via Custom commands.

There is the code that need to be executed to launch Excel :

$excel = New-Object -ComObject excel.application -ErrorAction STOP $excel.visible = $false $workbook = $excel.Workbooks.Open($FilePath)

This should open my excel workbook. Although it does'nt open and throws an error :

image.png

How to interact with com objects on Adaxes?

by (20 points)

1 Answer

by (15.9k points)
0 votes

Hello,

Please, make sure that Excel is installed on the computer where Adaxes service runs. For an example of the script that creates and emails a report in Excel file, please, have a look at Script 1: Report in Excel section of the following repository article: https://www.adaxes.com/script-repository/computers-with-bitlocker-installed-or-not-installed-s496.htm. Additionally, please, make sure that you selected the PowerShell script type in the configuration of the Run a program or PowerShell script action and pasted the script into the corresponding field. image.png

by (20 points)
0

Hi, thanks for your quick reply !

I will check this article.

Excel is already installed and i can run my script via the Powershell command line from Adaxes server.

I tried as script or program run, but i have the same error.

Related questions

We are trying to send e-mail notifications using Exchange Online. Everything I can find online shows that this uses smtp.office365.com. This works for us if we don't select the ... it's ready to start mail negotiation, but then Adaxes just stops. Why is this?

asked Aug 18 by jgcovalt (70 points)
0 votes
1 answer

I have tried it using the Custom Commands Action "Add the user to a group", which only allows me to add the user to one group at a time, and can't use the multiple DNs that the ... I can't get it to work. Could you assist me in finding the best way to do this?

asked Jan 16, 2024 by dominik.stawny (280 points)
0 votes
1 answer

Hi, I'm trying to open Adaxes object with Powershell script, and receive "object does not exist" error message. The script is executed remotely (not ... + FullyQualifiedErrorId : DotNetMethodException Any helps will be greatly appreciated. Thank you, Van

asked Apr 24, 2013 by vnguyen (20 points)
0 votes
1 answer

Is it possible to connect to the Microsoft 365 Security & Compliance center through a PowerShell script? We are trying to configure users that belong to a ... department for a retention policy through the use of the Set-RetentionCompliancePolicy command.

asked Jan 3, 2022 by scoutcor (180 points)
0 votes
1 answer

Hi I've added values to two attributes of an Oraganization Unit: adm-CustomAttributeText1 adm-CustomAttributeText2 I'm trying to extract these properties with a powershell ... But this does not provide the value set in adm-CustomAttributeText1. Any ideas?

asked Jan 28, 2013 by kjesoo (960 points)
0 votes
1 answer