For seemingly no reason whatsoever, I will randomly receive an error message on the dashboard stating that ‘New-GUID’ is not recognized as the name of a valid cmdlet. I really wish I could provide more context for this issue, but unfortunately the log is no help here. All I get is a warning message that a certain element could not be found. I’m unsure if that relates to some other issue though. I also added the containing module for New-GUID into the endpoint initialization on the dashboard.
Yeah, I’m definitely not using New-GUID anywhere in my actual code, so it must be something internal to UD.
I unfortunately can’t consistently replicate the errors. It seems to happen more often when first login to the dashboard (we’re using Azure AD authentication), but sometimes it will just occur during normal use.
This seems to only affect the home page and one dynamic page. The dynamic page is made up of a ton of controls, but the home page is essentially just a collapsible, 3 Selects, 1 button, and a grid (with roughly 1200 rows). I apologize for being so vague, but I’m really at a bit of a loss.
Man, that’s really weird. We could change UD to use [Guid]::NewGuid() to get around this but that’s baffling that a built in function is reporting that it’s not defined. You could try to do what @BoSen29 suggested and maybe add the function to New-UDEndpointInitialization so you don’t have to add it to every endpoint. I’ll write an issue to get rid of New-Guid due to this issue. Should just be a find\replace in the UD source.
I’m sorry for my late reply. It’s been a long week. This whole issue completely baffles me as well, specifically the fact that it’s behavior is so inconsistent. However, after manually including the New-Guid function in the New-UDEndpointInitialization param on the New-UDDashboard cmdlet as @BoSen29 suggested, I’ve not seen the error again. I’m a bit unsure as to why exactly this works, yet Powershell can’t seem to find the cmdlet in it’s own built-in functions, but I digress.
Thus far everything seems just fine. Thank you both for your help!