import-csv to find exchangeserver per user?

Import-Csv C:\dump\users.csv | Foreach {get-exchangeversion -Identity $_.emailAddress}

The term 'get-exchangeversion' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
he spelling of the name, or if a path was included, verify that the path is correct and try again.
t line:1 char:40

trying to verify if my users are on exchange2013 or ex2007 servers.

no custom function named Get-ExchangeVersion


  • Edited by totalnet32 Tuesday, July 28, 2015 2:16 PM
July 28th, 2015 1:55pm

This would be enough for me.. i guess (there is really no need to use Exchange cmdlets)

$csv = Get-Content .\CSV\emailaddress.csv
foreach ($address in $csv)
{
 $ldapfilter = "proxyaddresses=smtp:$($address)"
 Get-ADUser -LDAPFilter "($ldapfilter)" -properties homemdb,msExchVersion |select name,homemdb,msExchVersion 
} 

  • Marked as answer by totalnet32 Wednesday, July 29, 2015 6:24 PM
Free Windows Admin Tool Kit Click here and download it now
July 29th, 2015 6:38am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics