0 votes

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

0 votes
by (11.0k points)

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

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

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 by dominik.stawny (160 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 (120 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)
+1 vote
1 answer

I am trying to connect to teams via powershell in adaxes to run the following commands. Set-CsUser -Identity <UPN> -EnterpriseVoiceEnabled $true -HostedVoiceMail $true ... (policyname)" I am not able to run the following though, Connect-MicrosoftTeams

asked Apr 22, 2021 by TJ_Umredkar (140 points)
3,326 questions
3,026 answers
7,727 comments
544,683 users