Solved

Exchange 2010 powershell script not working

Posted on 2014-09-30
1
97 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:alexgreen312
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

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Join & Write a Comment

Resolve DNS query failed errors for Exchange
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.
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

705 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now