Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

need assistance with a powershell or quest ad cmdlets script

Posted on 2013-11-15
1
Medium Priority
?
311 Views
Last Modified: 2013-11-15
can someone assist with this script.

I have approx. 200 full access permissions I need to assign.

manually the script would be:
Add-MailboxPermission -Identity "sharedmailbox" -User john.smith -AccessRights Fullaccess -InheritanceType all -automapping $false

Open in new window


how can I reference an import CSV and use variables to automate this.

csv would be

source                                  user
sharedmbx1                        john.smith
sharedmbx2                        sam.jones
sharedmbx3                        john.jones
....


many thanks

S.
0
Comment
Question by:siber1
1 Comment
 

Accepted Solution

by:
siber1 earned 0 total points
ID: 39652663
figured it out myself: [in case anyone could use it]

$csv = import-csv c:\test.csv
foreach ($line in $csv) 
{    
Add-MailboxPermission -Identity $line.target -User $line.user -AccessRights Fullaccess -InheritanceType all -automapping $false
    }

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

886 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