0 votes

I made a custom command that executes a powershell script, if you run the script from the adaxes console, then everything works, but if you run the command from the web interface, an error pops up. Through experience, I realized that the variables that I assign in the script, for example $weburi = "https://url-address.com" are not assigned. If you add $Context.LogMessage("$weburi, "Information") to the script, you can see that the value is empty. Am I doing something wrong?

by (80 points)
0

Hello,

For troubleshooting purposes, please, post here or send us (support@adaxes.com) a screenshot of the custom command you have and the script in TXT format. Any additional details will be much appreciated.

0

I think I found the reason, but I did not understand yet how to solve it. A couple of variables are taken from the environment variables, they are just not set.

0

Hello,

Sorry for the confusion, but we are not sure what exactly you mean and what the issue is. Please, describe the issue in all the possible details with live examples and screenshots. Also, please, provide us with the details requested in the previous post. You can post them here or send to us (support@adaxes.com).

Please log in or register to answer this question.

Related questions

0 votes
1 answer

Hi, I'm working on a custom command to set account expiration - like this No matter what time is selected by user - it set's to 23:59. But in the approval email - ... the one, which was selected by user. Can it be modified before sending for approval? Thanks!

asked Jul 25, 2019 by Dmytro.Rudyi (850 points)
0 votes
1 answer

Hello, Is it possible to have a variable or custom field that I could use and reference from multiple PowerShell scripts? For example, I want to have two custom commands, ... It could be something system wide or maybe local to the scheduled task? Thanks! Ryan

asked Jun 4, 2019 by ryan_breneman (920 points)
0 votes
1 answer

Hello, I'm trying to execute a custom command through a Powershell script, but I'm struggling to pass multiple values to an AD Object Picker parameter. ... , $NULL, $NULL, 0) $obj.ExecuteCustomCommand($command.CommandID, $commandArguments) Thanks in advance!

asked Nov 24, 2021 by KelseaIT (320 points)
0 votes
1 answer

I am wanting to export a list of users including the properties of a specific custom attribute. Ideally, I would be able to run a get-admuser and filter on a custom attribute, but even an excel report with the custom attributes would work. Is this possible?

asked Sep 9, 2021 by ggallaway (300 points)
0 votes
1 answer

Hi there, i've a custom command with multiple powershell scripts (for clearance reasons). If for example the frist script produces an error i Write an Error but the next ... tried with an simple exit 1; I only Write-Errors on issues. Kind regards, Constantin

asked Jul 23, 2021 by Constey (190 points)
2,870 questions
2,591 answers
6,730 comments
111,710 users