This bit of your code will never work:
$users=Get-Content c:\temp\users.csv
ForEach ($user in $users)
{
Disable-ADAccount -Identity $($user.name)
}
Each "$user" object in the "$users" array is just a simple string. A string object has no property named "name". The result is that you're trying to use $null as the value for the -Identity parameter value.
What sort of identity have you placed in your file (users.csv)? Acceptable values would be one of these:
A distinguished name
A GUID (objectGUID)
A Security Identifier (objectSid)
A SAM Account Name (SAMAccountName)
With an appropriate identity in the CSV column named "name", this should produce the results you want:
Import-Csv c:\temp\users.csv |
ForEach-Object {
Disable-ADAccount -Identity $user.name -PassThru |
Select-Object SamAccountName,enabled
} | Export-Csv c:\temp\output.csv -NotypeInformation