I am looking at composing a script that can faxnumbers as input and provide me the list of users that the fax number is assigned to.
So far, I have come up with the below:
$faxnumbers = import-csv c:\temp\test.csv
foreach ($faxnumber in $faxnumbers)
{
Get-user -resultsize unlimited -Filter {((Otherfax -eq '$_.number') -and (RecipientType -eq 'UserMailbox'))} | FT name*
}
I am unable to formulate a method to call '$number' (From the input file) variable in the above command. Any help is greatly appreciated!