Quantcast
Channel: Exchange Server 2013 - General Discussion forum
Viewing all articles
Browse latest Browse all 4521

Add-publicfolderclientpermission input file for multiple users

$
0
0

Need some help with this script:

 $users = import-csv "Usernames.csv"
foreach ($user in $users) {
Get-PublicFolder "PublicFolder"
add-publicfolderclientpermission -accessrights PublishingEditor -user $user

If you look at the error below it looks like it is trying to add the user in line 1 of the CSV file to each user in the csv file

Error:

Cannot process argument transformation on parameter 'User'. Cannot convert value "@{user_in_line1=User_in_line2}" to type "Microsoft.Exchange.Management.StoreTasks.MailboxFolderUserIdParameter". Error: "Cannot convert hashtable to an object of the

following type: Microsoft.Exchange.Management.StoreTasks.MailboxFolderUserIdParameter. Hashtable-to-Object conversion is not supported in restricted language mode or a Data section."


Viewing all articles
Browse latest Browse all 4521

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>