Fr. Vandecan
asked on
powershell - ActiveDirectory - get the fax number of a speciic user and put it into a variable
I'm struggeling with something which should be easy as that....
Function GetItemFromAdUser($strUser ,$strItem) {
$strVariable = Get-ADUser -filter "Name -like '$strUser'" -properties $strItem | Expand $strItem
}
$Fax = GetItemFromAdUser('fvandec an" "fax")
but nothing in Fax.... (neither in city etc...)
Where is my mistake?
Function GetItemFromAdUser($strUser
$strVariable = Get-ADUser -filter "Name -like '$strUser'" -properties $strItem | Expand $strItem
}
$Fax = GetItemFromAdUser('fvandec
but nothing in Fax.... (neither in city etc...)
Where is my mistake?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I have recommended this question be closed as follows:
Accept: oBdA (https:#a42352719)
If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.
Pber
Experts-Exchange Cleanup Volunteer