Hello,
Yes, it is possible. The solution will include a Home Page Action and a Business Rule. The action will contain a DN syntax property (e.g. See Also) that will allow selecting the computers that will be added to the list of workstations for the user. The Business Rule will trigger After Updating a User and execute a PowerShell script that will update the userWorkatations property with the computers specified in the See Also property of the user. The script will be executed only if the See Also property changes.
i. Creating the Home Page Action
- Launch Adaxes Web Interface Customization tool.
- Select the interface type and click Configure Home Page Actions on the General tab.
- Click Add and select Modify User action.
- On step 2 of the wizard, define the conditions for selecting the user to be modified and click Next.
- Select Use customized form and click Customize Form.
- Delete all the sections except for one (e.g. General).
- Delete all the properties from the section and click Add below Section fields.
- Double-click the See Also property.
- Select Show only the following object types.
- Select only the Computers checkbox.
- Click OK twice and finish creating the Home Page Action.
ii. Creating the Business Rule triggering After Updating a User
-
Launch Adaxes Administration Console.
-
Right-click your Adaxes service node, navigate to New and click Business Rule.
-
On step 2 of the Create Business Rule wizard, select User Object type.
-
Select After Updating a User and click Next.
-
Click Add Action.
-
Select Run a program or a PowerShell script.
-
Enter a short description and paste the script below into the Script field.
$attributeName = "SeeAlso" # TODO: modify me
function UpdateWorkStations ($userWorkStationsString)
{
# Update user WorkStations
$Context.TargetObject.Put("userWorkstations", $userWorkStationsString)
$Context.TargetObject.SetInfo()
}
try
{
$computerDNs = $Context.TargetObject.GetEx($attributeName)
}
catch
{
UpdateWorkStations $NULL
return
}
$userWorkStations = New-Object "System.Collections.ArrayList"
foreach ($dn in $computerDNs)
{
$computer = $Context.BindToObjectByDN($dn)
$netBIOSName = $computer.Get("sAMAccountName").TrimEnd("`$")
[void]$userWorkStations.Add($netBIOSName)
}
$userWorkStationsString = [System.String]::Join(",", $userWorkStations.ToArray())
UpdateWorkStations $userWorkStationsString
-
Click OK.
-
Right-click the action you have created and click Add Condition.
-
Select If <property> changed.
-
Select If See Also has changed and click OK.
-
Click Next and finish creating the Business Rule. You should have something like the following:
For information on how to change property display names, have a look at the following help article: https://www.adaxes.com/help/?HowDoI.Man ... Names.html.