12:59:33 [Warn] PowerShellExecutionService Error executing endpoint 2237c4d8-27a1-4603-ae73-1477afa1ab64. Method invocation failed because [Microsoft.ActiveDirectory.Management.ADUser] does not contain a method named ‘op_Addition’.
Is the error i am getting, that endpoint is the following code:
I just want to make sure we aren’t running the button code when the page is loading. Next version, I’m going to put the stack trace in the execution service so we can see what line this is coming from…
I am really stuck as to what is going on. The Functions are all defined as custom functions for the dashboard in a functions.ps1 file and initialized via
Is having those new-UDendpoints necessary? I know i had to have them back when i was adding all of this via Caching from AD and injecting them like this: https://hastebin.com/dokudimoba.pl
I never really considered removing the endpoints in there with this update where i stopped adding them as “attributes”
It’s usually not necessary. The reason to use New-UDEndpoint like this is in case you are having problems with scoping. I don’t think you would so you should be able to just return a script block from this function rather than a UDEndpoint.
Under the hood, UD is creating a UDEndpoint anyways. Using New-UDEndpoint just makes it more explicit and allows you to specify exactly which variables you’d like saved to the scope.