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 (280k 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

Hello. I got a script that when E-mail forwarding is set, it automatically sends an email to the person that will recieve the forwarded emails for 6 months. But I'd like ... what to put in the xxxxxxx so it would take the account that im running command on.

asked Jun 3 by EdgarsABG (110 points)
0 votes
1 answer

Hello there, We have recently moved (almost) every computer from on-prem to cloud only and have setup some scheduled tasks to disable users based off of Last Logon and Last Logon ... in a different way? And if not, are there any plans to leverage that data?

asked May 21 by jacobchugg (20 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 (330 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)
3,439 questions
3,135 answers
7,993 comments
546,401 users