Getting the follow error message:
Jul 13, 2021 8:51 PM An error occurred: Cannot process argument transformation on parameter ‘Icon’. Cannot create object of type “UniversalDashboard.Models.FontAwesomeIcons”. The id property was not found for the UniversalDashboard.Models.FontAwesomeIcons object. The available property is: [value__ <System.Int32>]
Endpoint: ProvisioningGrid
Session: d47ea06f-44ed-434e-8ada-a64c06ebe9d5
File: C:\ProgramData\UniversalAutomation\Repository\Desktop.ps1
Endpoint Start Line: 257
Endpoint End Line: 281
Stack Trace: at , : line 10
at , : line 3
from the following Code:
$PageProvisioning = New-UDPage -Name "Provisioning" -Content {
new-udgrid -Id "ProvisioningGrid" -Title "Provisioning" -Headers @("Name", "UserName", "Title", "IDs", "Limited","Active") -Properties @("displayName", "SAMAccountName", "title", "ids", "Limited", "Active") -Endpoint {
get-aduser -filter * -SearchBase "OU=Provisioning,OU=Active,OU=_Users,DC=Domain,DC=com" -Properties displayName, SAMAccountName, title, employeeID, employeeNumber,universalID | Sort displayName | foreach {
[pscustomobject]@{
displayName = $_.displayName
SAMAccountName = $_.SAMAccountName
title = $_.title
ids = $_.employeeID + "/" + $_.employeeNumber + "/" + $_.universalID
# Create Button for Moving User to Limited OU
Limited = New-UDButton -icon (New-UDIcon -Icon user_slash) -BackgroundColor "#FF5733" -OnClick (
New-UDEndpoint -Endpoint {
Show-UDToast -Message ("Moving User to Limited OU: " + $_.displayName) -Duration 4000 -Position center
$_ | Move-ADObject -TargetPath "OU=Limited,OU=Active,OU=_Users,DC=Domain,DC=com"
Sync-UDElement -Broadcast -Id "ProvisioningGrid"
}
)
Active = New-UDButton -icon (New-UDIcon -Icon user_check) -BackgroundColor "#32FF00" -OnClick {
Show-UDToast -Message ("Activating User: " + $_.displayName) -Duration 4000 -Position center
ActivateUser -aduser $_
Sync-UDElement -Broadcast -Id "ProvisioningGrid"
}
}
} | Out-UDGridData
} -AutoRefresh -RefreshInterval 600
}
I started with
New-UDButton -icon user_slash
and tried
New-UDButton -icon (New-UDIcon -Icon user_slash)
I am not even sure this is the problem in the code.
I have been very frustrated with the conversion process of simple working of Universal Dashboard to over complexities of Universal Powershell.
Thank for help in advance.
Chris