0 votes

Testing script located here https://www.adaxes.com/script-repository/export-data-from-onedrive-s568.htm

$tenantDN not Null

Throwing Error:

You cannot call a method on a null-valued expression. At line:15 char:1

  • $tenant = $Context.BindToObjectByDN($tenantDN)
  • 
      + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : InvokeMethodOnNull
by (480 points)

1 Answer

0 votes
by (270k points)

Hello Derek,

Do we understand correctly that you are executing the script in Windows PowerShell? The thing is that the script uses the built-in Adaxes variable $Context and thus can only be executed in a Business Rule, Custom Command or Scheduled Task. Also, please, make sure that the user for which the script is executed has an associated Microsoft 365 (former Office 365) tenant registered in Adaxes. For details, have a look at step 8 of the following tutorial: https://www.adaxes.com/tutorials_ActiveDirectoryManagement_ManageAndAutomateOffice365.htm#collapse1.

0

Verified Step 8. Alxo, as far as powershell, if i edit the script and view resolved value references value and copy that into PS, shouldn't i be able to test / run the script? That's how i am running it in PS.

0

Hello Derek,

Sorry for the confusion, but we are not sure what exactly you mean. Could you, please, post here or send us (support[at]adaxes.com) the exact script you are executing in Windows PowerShell?

0

i was able to get it working. it was a space that had to be removed in the URL.

Related questions

0 votes
1 answer

This is what I need to accomplish. Day one, I perform an export of the following four attributes for all Users in AD - DN, employeeID, telephoneNumber, location. Day 2, ... in which one of them has changed. It possible to achieve this using a scheduled task?

asked Mar 23, 2015 by sbanks (270 points)
0 votes
1 answer

I added a chart based on report "soon-to-expire passwords" to the homepage. In Adaxes console, it will show a chart with time/date of when the password will expire. In the ... the report in web interface, it will show data but the chart will still be blank.

asked Mar 20 by tromanko (180 points)
0 votes
1 answer

Hi we want to Copy the Master Data Location properties (Adress, Company, Country etc.) from one User to another User. Personal Data like Name, Mailadress, Groups ... hope someone can give us something similar just for properties. Thank you in advance Marcus

asked Sep 7, 2023 by mvr (20 points)
0 votes
1 answer

The Adaxes Script Repository used to have two related scripts "Get custom value stored in Adaxes configuration" and "Store data in Adaxes configuration". These scripts ... /https://www.adaxes.com/script-repository/store-data-in-adaxes-configuration-s430.htm

asked Sep 1, 2023 by Carl Bruinsma (120 points)
0 votes
1 answer

Hello, I'd like to create a custom Adaxes report based on the following Logging Filters - I'm currently having to filter the logs manually each time I want to gather this ... would be easier to jump on a call to discuss this further? Thank you in advance!

asked Nov 16, 2020 by sirslimjim (480 points)
3,326 questions
3,026 answers
7,727 comments
544,681 users