$name="d4rkcell"
Get-ADUser -LDAPFilter "(sAMAccountName=$Name)" -Properties extensionAttribute12
I use the code above, but the result shows more than just extensionAttribute12, it shows other information, such as:
DistinguishedName : CN=d4rkcell,OU=Users,...DC=co,DC=uk
Enabled : True
extensionAttribute12 : \\path\to\a\share
GivenName : Joe
Name : U0023883
ObjectClass : user
ObjectGUID : a0562e97-cb58-463b-bae6-8e0087fa494b
SamAccountName : d4rkcell
SID : S-1-5-21-1004336368-1374586140-1801574631-62475
Surname : Bloggs
UserPrincipalName : J.Bloggs@....co.uk
Ideally, I would just like to keep the value stored in extensionAttribute12, can someone help me here or help me split this line? Bit stuck, help would be much appreciated.
source
share