I am way out of practice here but I am just going to present what I have. I apologize for the misuse of terms. I have been working on this for two weeks but last few days have been all that I did as it is the last item to solve. I am self taught since the classes from college but I do not do this regularly except once a year.
I am trying to pull a single property value from a collection/array from an object into the .csv file. If I am way off, please tell me. I welcome it.
This is what I want in the report (this is the Get-member of the User in Question)
uTAD2000-DS-collegeDepartment Property Microsoft.ActiveDirectory.Management.ADPropertyValueCollection uTAD2000-DS-collegeDepartment {get;set;}
But it outputs
Microsoft.ActiveDirectory.Management.ADPropertyValueCollection
Code I have so far is similar to how I fixed the date and time issue
@{N ="uTAD2000-DS-collegeDepartment";E ={[Get-ADResourceProperty -ResultPageSize 1](PSItem."uTAD2000-DS-collegeDepartment")}
The properties I need have the “{ }” and only one value in it. How do I get it to produce?
What I have so far is …
Get-ADGroupMember -id Students.HSC.COM.M1|% {Get-ADUser -id $_ -properties EmployeeID,Organization,departmentNumber,department,cn,GivenName,MiddleName,surName,EmailAddress,Title,uTAD2000-DS-jobBeginDate,uTAD2000-DS-collegeDepartment}| Select-Object -Property EmployeeID,Organization,departmentNumber,department,cn,GivenName,MiddleName,surName,EmailAddress,Title,@{N ="uTAD2000-DS-jobBeginDate";E ={[DateTime]::FromFileTime($PSItem."uTAD2000-DS-jobBeginDate")}},@{N ="uTAD2000-DS-collegeDepartment";E={[Get-ADResourceProperty -ResultPageSize 1](PSItem."uTAD2000-DS-collegeDepartment")}| CovertTo-Csv | Out-file -Path ~\M1.csv -NoTypeInformation