locked
About Remove-MailContact command and confirm RRS feed

  • Question

  • Hi guys,

    i am working to a powershell script using a ems command.

     

    I try to use a Remove-MailContact :

    'Mydomain/exchange/user test' | Remove-MailContact

    but it ask me a confirm.

    I try also with -Confirm switch but nothing.

    How i can avoid a confirm for Remove-MailContact command ?

    I use Exchange 2010 sp1 RU3

    Thanks in advance.

     

    Monday, May 16, 2011 5:09 PM

Answers

  • maybe use -Confirm:$Y

     

    Have you tried to use the -identity

    Remove-MailContact -Identity contoso.com/john

    • Marked as answer by Alter1974 Tuesday, May 17, 2011 2:37 PM
    Monday, May 16, 2011 5:16 PM

All replies

  • maybe use -Confirm:$Y

     

    Have you tried to use the -identity

    Remove-MailContact -Identity contoso.com/john

    • Marked as answer by Alter1974 Tuesday, May 17, 2011 2:37 PM
    Monday, May 16, 2011 5:16 PM
  • Did you do remove-mailcontact contact1 -confirm:$false
    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
    Monday, May 16, 2011 5:29 PM
  • Thanks to all!

     

    bye

    Tuesday, May 17, 2011 9:13 PM