Skip to content

Instantly share code, notes, and snippets.

@DailenG
Created June 13, 2024 11:59
Show Gist options
  • Save DailenG/9177956230f73100851bafe8b15e9fb7 to your computer and use it in GitHub Desktop.
Save DailenG/9177956230f73100851bafe8b15e9fb7 to your computer and use it in GitHub Desktop.
Reddit bConnor98
$UserInfo = ""
$UserInfo = $usersearchTextBox.Text
$UserInfo = Get-ADUser $UserInfo -Properties Title, Department, Mail, telephoneNumber, EmployeeID, DistinguishedName, Manager, MemberOf, Description
$ExtraGroup = Get-ADPrincipalGroupMembership $UserInfo | Select “gu_app_MorningPeople,gu_app_AfternoonPeople"
$JobTitleRecord.Text = $UserInfo.Title
$userdeptRecord.Text = $UserInfo.Department
$userEmailRecord.Text = $UserInfo.Mail
$userTelRecord.Text = $UserInfo.telephoneNumber
$EmpIDRecord.Text = $UserInfo.EmployeeID
$OURecord.Text = $UserInfo.DistinguishedName
$ManagerRecord.Text = $UserInfo.Manager
$ExtraMemberOfRecord.Text = "$($ExtraGroup)"
$userdescRecord.Text = $UserInfo.Description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment