Operating system: win 11 or win 10
PowerShell version(s): 5.1
Trying to update a mini tool created to display AD (on prem) information for users. It's really basic, type in user name and displays, name, samaccount, employee id, employeenumber, extensionattribute1 few other things. Would like to change the naming of what is displayed, instead on the gui it says extensionattribute1 would like it to say positionID.
Below is the script used and photo of the gui, marked with what would like to change.
- $formGetEmpInfoFromDispla_Load={
- #TODO: Initialize Form Controls here
- #Import-Module ActiveDirectory
- }
- $buttonFind_Click={
- #TODO: Place custom script here
- $displayname = $textboxdisplayname.Text
- $labelDisplayUserInfo.Text = Get-ADUser -Filter "name -like '$displayname'" -Properties Name, SAMAccountName, Enabled, description, title, UserPrincipalName, employeeID, employeeNumber, extensionAttribute1, extensionAttribute2, ScriptPath, manager, SID, physicalDeliveryOfficeName | Format-List -Property Name, SAMAccountName, EmployeeID, Enabled, Description, Title, physicalDeliveryOfficeName, UserPrincipalName, ScriptPath, employeeNumber, extensionAttribute1, extensionAttribute2,manager, SID | Out-String
- }
- $buttonLoadADModule_Click={
- #TODO: Place custom script here
- Import-Module ActiveDirectory
- $module = Import-Module ActiveDirectory -PassThru
- if (-not $module)
- {
- #Show error message
- }
- }