Solved

Exchange 2010 powershell script not working

Posted on 2014-09-30
1
103 Views
Last Modified: 2014-09-30
Afternoon,

I have the following script which is asking to confirm each and every time it removes the permissions

Import-csv C:\Temp\aliaslist.csv | Foreach {Get-Mailbox -identity $_.Alias | Remove-MailboxPermission -User wsht.local\svc.qmm -AccessRights FullAccess -InheritanceType All}

Open in new window


I've added a -confirm: $false after inheritancetype all and that still doesn't work. How do I stop prompting and automatically accept?

Thanks

Alex
0
Comment
Question by:Alex Green
1 Comment
 
LVL 8

Accepted Solution

by:
Acosta Technology Services earned 500 total points
ID: 40352007
You can set confirm preference to"none".

$ConfirmPreference = 'None'
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question