Created
June 13, 2024 11:59
-
-
Save DailenG/9177956230f73100851bafe8b15e9fb7 to your computer and use it in GitHub Desktop.
Reddit bConnor98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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