?
Solved

whats wrong with my script?

Posted on 2011-05-03
13
Medium Priority
?
268 Views
Last Modified: 2012-05-11
[PS] C:\Documents and Settings\Administrator.FOLIOADMIN>AddUsersToPFRecursive.ps
1 -TopPublicFolder "\Prices Master" -User "veronica" -Permission Reviewer
Get-PublicFolder : A parameter cannot be found that matches parameter name 'Master'.
At line:1 char:17
+ get-publicfolder  <<<< -identity \Prices Master -Recurse -resultsize unlimite
d
0
Comment
Question by:staffs964
  • 6
  • 5
12 Comments
 
LVL 31

Expert Comment

by:MegaNuk3
ID: 35515372
Try
"Prices Master"
Without the backslash
0
 

Author Comment

by:staffs964
ID: 35515736
thanks megaNuk3 but that didnt work out either, see result below

[PS] C:\Documents and Settings\Administrator.FOLIOADMIN>AddUsersToPFRecursive.ps
1 -TopPublicFolder "Prices Master" -User "veronica" -Permission Reviewer
Get-PublicFolder : A parameter cannot be found that matches parameter name 'Master'.
At line:1 char:17
+ get-publicfolder  <<<< -identity Prices Master -Recurse -resultsize unlimited
[PS] C:\Documents and Settings\Administrator.FOLIOADMIN>
0
 
LVL 31

Expert Comment

by:MegaNuk3
ID: 35517211
What happens if you try:
get-publicfolder -identity "\Prices Master" -Recurse -resultsize unlimited
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
LVL 31

Expert Comment

by:MegaNuk3
ID: 35517305
Is "\Prices Master" a top level public folder? If not, then you have to provide the full PF path.
0
 

Author Comment

by:staffs964
ID: 35690316
I assumed it was a top leve believing that the first two wre default levels this is the actual path which is: Public Folders\All Public Folders\Prices Master

I ran both ways and got these negative results, it has to be a syntax issue?

[PS] C:\Documents and Settings\Administrator.FOLIOADMIN>AddUsersToPFRecursive.ps
1 -TopPublicFolder "\All Public folders\Prices Master" -User "veronica" -Permiss
ion Reviewer
Get-PublicFolder : A parameter cannot be found that matches parameter name 'Pub
lic'.
At line:1 char:17
+ get-publicfolder  <<<< -identity \All Public folders\Prices Master -Recurse -
resultsize unlimited
[PS] C:\Documents and Settings\Administrator.FOLIOADMIN>AddUsersToPFRecursive.ps
1 -TopPublicFolder "\Public Folders\All Public folders\Prices Master" -User "ver
onica" -Permission Reviewer
Get-PublicFolder : A parameter cannot be found that matches parameter name 'Fol
ders\All'.
At line:1 char:17
+ get-publicfolder  <<<< -identity \Public Folders\All Public folders\Prices Master -Recurse -resultsize unlimited
[PS] C:\Documents and Settings\Administrator.FOLIOADMIN>
0
 
LVL 31

Expert Comment

by:MegaNuk3
ID: 35690395
Did you try my Get-publicFolder command I posted above?
0
 

Author Comment

by:staffs964
ID: 35690503
oops sorry, yes it returned positive with the full sub-directory listing, here the top few lines:

[PS] C:\Documents and Settings\Administrator.FOLIOADMIN>get-publicfolder -identi
ty "\Prices Master" -Recurse -resultsize unlimited

Name                                    Parent Path
----                                    -----------
Prices Master                           \
2005-6 Prices                           \Prices Master
2008 Prices                             \Prices Master
Prices                                  \Prices Master\2008 Prices
777 Fund                                \Prices Master
0
 
LVL 31

Accepted Solution

by:
MegaNuk3 earned 2000 total points
ID: 35690504
You are seeing a bug in the script with public folders that have spaces in their names. Fix is here:
http://vadimszenins.blogspot.com/2009/06/fixin-space-public-folder-name-issue-in.html
0
 

Author Comment

by:staffs964
ID: 35690576
I figured it out

it should be this "\'Prices Master'"   ' ' to allow for the space

thanks for you asistance though

staffs964 in the Caribbean
0
 

Author Comment

by:staffs964
ID: 35690586
ha we saw the same fix..  i will apply points for you.
0
 
LVL 31

Expert Comment

by:MegaNuk3
ID: 35690755
Glad you got it sorted.
0
 
LVL 74

Expert Comment

by:Glen Knight
ID: 37517306
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
Suggested Courses

840 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