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 (100 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

I have a number of custom Powershell scripts that add users to Teams, groups, etc. I re-use these scripts dozens of times for different conditions and only change one ... possible to convert this script to a custom command and pass parameters to it instead?

asked Dec 16 by cwyant-hfg (40 points)
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 (920 points)
0 votes
1 answer

In a business rule, I'd like to pass Adaxes variables into a powershell script that I'll run. For example, pass %username% into the script so it can be used inside the script.

asked Sep 5 by P-Sysadmin (20 points)
0 votes
0 answers

I have an issue in a custom command that I need a workaround for. In step 1, a Modify User command is used to change the User Principal Name of the account. Farther ... use the new value, or can I declare a new calculated variable that contains the new UPN?

asked Jul 17 by jmatthews (190 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)
3,589 questions
3,278 answers
8,303 comments
548,107 users