It would have been helpful when you posted the complete error message as well.
The parameter -Identity of the cmdlet Get-ADUser expects one of the 4 possible values:
A distinguished name
A GUID (objectGUID)
A security identifier (objectSid)
A SAM account name (sAMAccountName)
Do you provide something like this with your text file?
By default, Get-Content should be reading each line of your text file into an array as a separate element, regardless of the content of the line. You could check this by echoing the contents of the array, e.g at line 2:
echo $admins
If you don’t get an array as expected, try specifying that the information should be stored in an array, like this:
The source of the text file may also be important - you may need to specify the encoding of the file for Get-Content using the -Encoding parameter (valid options are listed on the Get-Content documentation page linked above).
This is important because PowerShell cmdlets are wildly inconsistent when it comes to their default encoding. Get-Content defaults to ANSI but others default to UTF-8. In particular, the end-of-line character may be different. If your text file was auto-generated by an application, or created on a *NIX platform and then transferred to Windows (DOS), it may not have the line break characters that Get-Content expects, which could result in the entire file being read in as a single line rather than individual lines (producing a single string variable rather than an array).