Output from a text file

by Apr 21, 2015

Hi.

Total newbie quistion

When i run

get-mailbox "user" | select-object name,datebase

It works

When i make a variable $ "user"

Get-Mailbox $A | Select-Object NAME,DATABASE

It works

When i make a list of users in a text fil and run

$ = get-content c:txt.txt

Get-Mailbox $A | Select-Object NAME,DATABASE

Nothing works..

I have tried get-mailbox | foreach {$a_.alias}

nothing works.

Someone have a clue ?