0 votes

I'm trying to understand the best approach to use when developing scripts for Adaxes. In the Management console you can't see the details of an object while coding.

What I'd like to do is figure out the best way to mimic the Context of an object and possibly be able to see its contents and so on. Being able to mimic the %attrib% would be nice as well but I figured that would be replaced after developing something based on a single object.

For Context of a User I'd think a Get-ADMUser might do the trick but its also possible there are additional attributes I don't see.

Thanks in advance for your advice.

by (790 points)
0

As I learn in the Mangement Console I've noticed that $Context.LogMessage seems useful for testing and viewing output.

Would this be the recommended way of reviewing script details?

1 Answer

0 votes
by (222k points)

Hello,

If you need to output specific values (e.g. values of object properties) in your scripts, using the $Context.LogMessage method is the best way. If that is not what you are trying to achieve, please, specify the desired behavior in all the possible details with live examples.

Related questions

0 votes
1 answer

Hi We create different Groups when a new OU is generated. The name of the groups consist of the OU name with additional text. We would like ... value $Context.SetModifiedPropertyValue($property, $value) $Context.LogMessage($value, "Information") Thanks, Mario

asked Jul 9, 2020 by maca (100 points)
0 votes
1 answer

I have a script that i am trying to run against all users in an OU, but the script will only run against 1 user then not run again for any other users in the OU. Any thoughts on why this would happen?

asked Mar 1, 2018 by kevball2 (100 points)
0 votes
1 answer

Hi smart people! I'm using this script: http://www.adaxes.com/script-repository ... t-s423.htm Which works great for sending an email to someone, listing their direct ... body of the email at once would be greatly appreciated! Thanks for any and all replies!

asked Mar 24, 2017 by 3Jake (150 points)
0 votes
1 answer

We are using the following script to track group membership changes and need the %username% field to amend if it already exists in the file location. Example: We make change ... -ItemType File # Save the report to the file Add-Content $file $report.ToString()

asked Mar 6, 2017 by willy-wally (3.2k points)
0 votes
1 answer

I am working on a custom deprovision task and have the need to delete a directory on a file server (not a profile directory) and cannot find a function in ... like the following path: \\servername\datafiles\hou\UserName\MyDocuments\* Thanks in advance.

asked Feb 9, 2015 by stuarts24 (50 points)
2,757 questions
2,491 answers
6,523 comments
1,468,897 users