• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 26
  • Last Modified:

change many users Auto reply configuration at the time

Hello to all,

I have this working:
$internalmessage = get-content c:\temp\kpm\internalmessage.txt
$externalmessage = get-content c:\temp\kpm\externalmessage.txt
Set-MailboxAutoReplyConfiguration kmartinez -AutoReplyState enabled -ExternalAudience all -InternalMessage "$internalmessage" -ExternalMessage "$externalmessage"

But it is one user at the time and I rather not  declare those variables so I prefer to enter the  path directly into the cmdlet if possible

I have this but it is not working.  My csv is called Aliases and my only column header is called Alias.

Import-CSV c:\temp\kpm\aliases.csv | ForEach {Set-MailboxAutoReplyConfiguration -AutoReplyState enabled -ExternalAudience all -InternalMessage "$internalmessage" -ExternalMessage "$externalmessage" -Alias $_.Alias}

Any help will be greatly appreciated
  • 2
1 Solution
FOXActive Directory/Exchange EngineerCommented:
Import-CSV 'c:\temp\kpm\aliases.csv' | ForEach {Set-MailboxAutoReplyConfiguration $_.Alias -AutoReplyState enabled  -InternalMessage "Pastethewholemessagehere" -ExternalMessage "pastthewholemessagehere"}
WTHTechAuthor Commented:
Worked perfectly!
FOXActive Directory/Exchange EngineerCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now