Good day everyone,
I am currently getting this error whenever I add a specific page to my dashboard. It’s working perfectly in the community version but not in the paid version.
Failed to get dashboard. Self referencing loop detected for property ‘module’ with type ‘System.Management.Automation.PSModuleInfo’. Path ‘pages[5].content[0].exportedFunctions.add-ADPermission’. Newtonsoft.Json.JsonSerializationException
Below is the script
New-UDPage -Name “Test” -Content {
Add-Type -AssemblyName ‘System.Web’
Get-PSSession | Remove-PSSession
$Credential = Import-Clixml C:\Dashboards\Reporting\Pwd\exchange.xml
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://exchange01.test03.aginion.net/Powershell -Authentication Basic -Credential $Credential
Import-PSSession $session
$test=New-UDGrid -Title “Test” -Endpoint {
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Where{$_.Lastlogontime -lt (Get-Date).AddDays(-30)} | Select DisplayName,UserPrincipalName,StorageLimitStatus,LastLogonTime | Out-UDGridData
}
New-UDLayout -Columns 1 -Content {
$test
}
}