0
get-aduser -f {name -like '*John*'} | format-Table name,SamAccountName
===
下不起作用。您的幫助將不勝感激,非常感謝您提前。
$name = Read-Host "Enter a First Name or Last Name"
$uname = "'*" + $name + "*'"
get-aduser -f {name -like $uname } | Format-Table name, SamAccountName