Solved

need assistance with a powershell or quest ad cmdlets script

Posted on 2013-11-15
1
307 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
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…

763 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