Solved

need assistance with a powershell or quest ad cmdlets script

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
Read this checklist to learn more about the 15 things you should never include in an email signature.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

895 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

14 Experts available now in Live!

Get 1:1 Help Now