[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 142
  • Last Modified:

Exchange 2010 powershell script not working

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
Alex Green
Asked:
Alex Green
1 Solution
 
Acosta Technology ServicesCommented:
You can set confirm preference to"none".

$ConfirmPreference = 'None'
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

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