![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Pipe response Yes to ALl I'm trying to run the following command: Get-Mailbox | set-Mailbox -ManagedFolderMailboxPolicy "Retention Policy" How do I get it to automatically use the "(A) yes to all" option as I am running this as a scheduled task. This one is driving me nuts. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Pipe response Yes to ALl I don't have Exchange but the convention is usually to have a -Force switch. Is there one? "Jeff" <Jeff@xxxxxx> wrote in message news:B21370A3-A656-4CFD-A808-A3F73132EF12@xxxxxx Quote: > I'm trying to run the following command: > > Get-Mailbox | set-Mailbox -ManagedFolderMailboxPolicy "Retention Policy" > > How do I get it to automatically use the "(A) yes to all" option as I am > running this as a scheduled task. > > This one is driving me nuts. |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Pipe response Yes to ALl It says "-force" is an invlid paramater "Josh Einstein" wrote: Quote: > I don't have Exchange but the convention is usually to have a -Force switch. > Is there one? > > "Jeff" <Jeff@xxxxxx> wrote in message > news:B21370A3-A656-4CFD-A808-A3F73132EF12@xxxxxx Quote: > > I'm trying to run the following command: > > > > Get-Mailbox | set-Mailbox -ManagedFolderMailboxPolicy "Retention Policy" > > > > How do I get it to automatically use the "(A) yes to all" option as I am > > running this as a scheduled task. > > > > This one is driving me nuts. |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Pipe response Yes to ALl Don't have Exchange Cmdlets to verify, but there are two ways you can suppress confirmation : # set the automatic variable to 'None' or 0 in your script $ConfirmPreference = 'None' # pass $false or 0 to the -Confirm switch ... -confirm:$false -- Kiron |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Pipe response Yes to ALl Hello Jeff, Quote: > I'm trying to run the following command: > > Get-Mailbox | set-Mailbox -ManagedFolderMailboxPolicy "Retention > Policy" > > How do I get it to automatically use the "(A) yes to all" option as I > am running this as a scheduled task. > > This one is driving me nuts. > Get-Mailbox | set-Mailbox -ManagedFolderMailboxPolicy "Retention Policy" -confirm: $false If you are using Exchange RTM, temporarily set $confirmpreference to none: $preference = $confirmpreference $confirmpreference = “None” Get-Mailbox | set-Mailbox -ManagedFolderMailboxPolicy "Retention Policy" $confirmpreference = $preference Karl |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Pipe response Yes to ALl that was it. thanks so much. Everything I read using Google had me using -confirm:$false without the space between : and $. Thanks "Karl Mitschke" wrote: Quote: > Hello Jeff, > Quote: > > I'm trying to run the following command: > > > > Get-Mailbox | set-Mailbox -ManagedFolderMailboxPolicy "Retention > > Policy" > > > > How do I get it to automatically use the "(A) yes to all" option as I > > am running this as a scheduled task. > > > > This one is driving me nuts. > > > If you are using Exchange SP1, use the -confirn switch: > > Get-Mailbox | set-Mailbox -ManagedFolderMailboxPolicy "Retention Policy" > -confirm: $false > > If you are using Exchange RTM, temporarily set $confirmpreference to none: > > $preference = $confirmpreference > $confirmpreference = “None” > Get-Mailbox | set-Mailbox -ManagedFolderMailboxPolicy "Retention Policy" > $confirmpreference = $preference > > > Karl > > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Using pipe in Powershell | PowerShell | |||
| RE: is it possible to pipe into switch -r? | PowerShell | |||
| Pipe a pipe command to a file | VB Script | |||
| possibly pipe max? | PowerShell | |||
| getting arguments from pipe | PowerShell | |||