none
-inputobject $users RRS feed

  • Question

  • PS C:\Scripts\Migratie> $users
    
    EmailAddress                      
    ------------                      
    testObject@fontein.fl
    testObject2@defontein.fl
    

    i have this object with two users.

    when i try to use invokecommand and need to use this object on the other server i do not get back the two users.

    invoke-command -computername server.office.local -Credential $rcred -scriptblock {
        foreach($user in $input){
            write-host "The happy user is $($user.emailaddress)"
        }
    } -inputobject $users

    what am i doing wrong?



    Friday, May 24, 2019 1:24 PM

Answers

All replies