Hi,
Im looking for a way to achieve the small script below. I have 5 places in a function where I get-aduser with different filters, but I don’t want to change this on every get-aduser separately. I want 1 variable where I can change it for all 5 filters at once.
$SearchProperties = @("Mail, MemberOf") $user = Get-ADUser "User" -Properties $SearchProperties $user.Mail
submitted by /u/Vendas
[link] [comments]
The post Get-AdUser -properties $variable appeared first on How to Code .NET.