So, What I am trying to do is have a button that says update employeeID inside a udgrid. I have tried to use a custom udhtml with a javascript and then us a udhtml with a button inside the the udgrid, and I tried outside the udgrid but failed both times.
New-UDHtml -Markup "
"
Then in the ud grid
New-UDGrid -Title “TBC Employees” -Headers @(‘Enabled’,‘Name’,‘Username’,‘TechCode’,‘ADPNumber’) -Properties @(‘Enabled’,‘Name’,‘samaccountname’,‘EmployeeID’,‘EmployeeNumber’) -Endpoint {
$users = Get-ADUser -Filter {enabled -eq true} -Properties enabled,name,samaccountname,EmployeeID,EmployeeNumber,DistinguishedName -SearchBase "OU=TBC Employees,OU=TBC,DC=TBC,DC=Local" | sort Name | select @{label='Enabled';expression={.enabled.tostring()}},@{label=“Name”;expression={(New-UDLink -Text _.Name -FontColor "#CCCCFF" -Url "/pages/(_.DistinguishedName)" -OpenInNewWindow)}},samaccountname,@{label="EmployeeID";expression={if (.EmployeeID -like “”) {New-UDHtml -Markup “Update”}}},EmployeeNumber
users += Get-ADUser -Filter * -Properties enabled,name,samaccountname,EmployeeID,EmployeeNumber,DistinguishedName -SearchBase "OU=Disabled,DC=TBC,DC=Local" | sort Name | select @{label='Enabled';expression={.enabled.tostring()}},@{label=“Name”;expression={(New-UDLink -Text _.Name -FontColor "#CCCCFF" -Url "/pages/($.DistinguishedName)" -OpenInNewWindow)}},samaccountname,EmployeeID,EmployeeNumber
$users | Out-UDGridData
} -AutoRefresh -RefreshInterval 500 -FontColor “#fafafa” -PageSize 13 -BackgroundColor “#252525”
Does anyone else have any other ideas on how to do this?
Current Version 2.2.1