Stelian Stan
asked on
PowerShell Script
I want to create a script to change the permissions on multiple Public Folders based on a CSV file. I have a CSV file
PF-Chg.csv
PF-Chg.csv
ASKER
On each PF I only need to change OldFC with NewFC and keep the same permissions.
ASKER
Thank you Will for your quick response. I was thinking to use something like this:
but I'm getting this error:
I need a way to read "\Max Store Reports\store059" for '$PF.Name
$PFPerm = Import-Csv "C:\PF_Chg.csv"
foreach ($PF in $PFPerm) {ReplaceUserWithUserOnPFRecursive.ps1 -TopPublicFolder "'$PF.Name'" -UserOld $PF.OldFC -UserNew $PF.NewFC}
but I'm getting this error:
get-publicfolder : There is no existing PublicFolder that matches the following Identity: '@{Name=\Max Store Reports\store059; OldFC=MikeC; NewFC=BrianC}.Name'. Please make
sure that you specified the correct PublicFolder Identity and that you have the necessary permissions to view PublicFolder.
I need a way to read "\Max Store Reports\store059" for '$PF.Name
The below error message is referring to exactly what it says. It cannot find the Public Folder you have listed.
The -Identity parameter needs to have the GUID or Public Folder name that represents the public folder. Using the full path might help...
This is an example from the help in Powershell...
Get-PublicFolder -Identity "\Legal\Documents\Pending Litigation"
The -Identity parameter needs to have the GUID or Public Folder name that represents the public folder. Using the full path might help...
This is an example from the help in Powershell...
Get-PublicFolder -Identity "\Legal\Documents\Pending Litigation"
The Variable should not need "" around it. Try removing those. Also for the syntax it might only be looking for ""\Max Store Reports" as the toplevel PF.
Also take a look at the link below for more examples/syntax.
http://www.msexchange.org/articles-tutorials/exchange-server-2007/tools/using-exchange-sever-2007-built-in-scripts-part1.html
Also take a look at the link below for more examples/syntax.
http://www.msexchange.org/articles-tutorials/exchange-server-2007/tools/using-exchange-sever-2007-built-in-scripts-part1.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked for me.
Note: the csv file you create needs to have the following column headings
- Name (Public Folder Name\location)
- User (User you want to grant access to)
- Access (Access level you want to give to the user)
Open in new window
Another thing you can use is PFDAVadmin which is also a great tool to modify permissions for Public Folders.Download - http://www.microsoft.com/en-ca/download/details.aspx?id=22427
Manual - http://technet.microsoft.com/en-us/library/bb508858(v=exchg.65).aspx
Thanks
Will.