Link to home
Start Free TrialLog in
Avatar of staffs964
staffs964

asked on

whats wrong with my script?

[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
Avatar of MegaNuk3
MegaNuk3
Flag of United Kingdom of Great Britain and Northern Ireland image

Try
"Prices Master"
Without the backslash
Avatar of staffs964
staffs964

ASKER

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>
What happens if you try:
get-publicfolder -identity "\Prices Master" -Recurse -resultsize unlimited
Is "\Prices Master" a top level public folder? If not, then you have to provide the full PF path.
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>
Did you try my Get-publicFolder command I posted above?
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
ASKER CERTIFIED SOLUTION
Avatar of MegaNuk3
MegaNuk3
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I figured it out

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

thanks for you asistance though

staffs964 in the Caribbean
ha we saw the same fix..  i will apply points for you.
Glad you got it sorted.
Avatar of Glen Knight
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.