$name="d4rkcell"
Get-ADUser -LDAPFilter "(sAMAccountName=$Name)" -Properties extensionAttribute12
I am using the above code 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
I would ideally just want the value stored in extensionAttribute12, can anyone help me here or help me split this string ? Bit stuck, help would be much appreciated.
