Solved

need assistance with a powershell or quest ad cmdlets script

Posted on 2013-11-15
1
309 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Suggested Courses

628 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