[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Trying to run script .\AddReplicaToPFRecursive.ps1

Posted on 2011-04-28
19
Medium Priority
?
5,432 Views
Last Modified: 2012-05-11
trying to run .\AddReplicaToPFRecursive.ps1:

Please see below and tell me what I am typing wrong?

[PS] C:\Windows\system32>C:\Program Files\Microsoft\Exchange Server\V14\Scripts>.\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerToAdd "Giant"

this is the error I am getting:
The term 'C:\Program' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:11
+ C:\Program <<<<  Files\Microsoft\Exchange Server\V14\Scripts>.\AddReplicaToPFRecursive.ps1 -TopPublicFolder "\" -ServerToAdd "Giant"
    + CategoryInfo          : ObjectNotFound: (C:\Program:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


????? any thoughts???
0
Comment
Question by:Rasheedlh
  • 10
  • 9
19 Comments
 
LVL 16

Expert Comment

by:Jon Brelie
ID: 35486894
You need quotes around the command:

C:\Program Files\Microsoft\Exchange Server\V14\Scripts>.\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerToAdd "Giant"


should be

"C:\Program Files\Microsoft\Exchange Server\V14\Scripts>.\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerToAdd "Giant""
0
 
LVL 16

Expert Comment

by:Jon Brelie
ID: 35486914
scratch that... it looks like you cut and pasted the path of the folder you are working in.

you should do this:

cd "C:\Program Files\Microsoft\Exchange Server\V14\Scripts:

then

.\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerToAdd "Giant"
0
 

Author Comment

by:Rasheedlh
ID: 35486957
quotes did not work...

[PS] C:\Windows\system32>"C:\Program Files\Microsoft\Exchange Server\V14\Scripts>.\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerToAdd "Giant""
Unexpected token '\" -ServerToAdd "Giant""' in expression or statement.
At line:1 char:130
+ "C:\Program Files\Microsoft\Exchange Server\V14\Scripts>.\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerTo
Add "Giant"" <<<<
    + CategoryInfo          : ParserError: (\" -ServerToAdd "Giant"":String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
LVL 16

Expert Comment

by:Jon Brelie
ID: 35486984
Right.  See my second note.

C:\Program Files\Microsoft\Exchange Server\V14\Scripts
is where the script lives.

.\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerToAdd "Giant"
is what actually executes the script
0
 

Author Comment

by:Rasheedlh
ID: 35486991
Does this mean that it worked? How can I check that replica has happened? I want to check before I run .\MoveAllReplicas.ps1

[PS] C:\Windows\system32>cd "C:\Program Files\Microsoft\Exchange Server\V14\Scripts:
>> .\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerToAdd "Giant"
>>
0
 
LVL 16

Expert Comment

by:Jon Brelie
ID: 35487014
If you want to execute the script without changing to that directory, then you need to omit the .\ like this:

"C:\Program Files\Microsoft\Exchange Server\V14\Scripts\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerToAdd "Giant""

Open in new window

0
 

Author Comment

by:Rasheedlh
ID: 35487066
is there a way to see if this worked before I run the next script?
0
 

Author Comment

by:Rasheedlh
ID: 35487085
So would the script look like this? all together...

C:\Windows\system32>"C:\Program Files\Microsoft\Exchange Server\V14\Scripts\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerToAdd "Giant""
0
 
LVL 16

Expert Comment

by:Jon Brelie
ID: 35487113
yes, in EMC, go to the public folder toolbox.  Right click your public folders and select properties.  Click on the Replication tab and make sure that your replication partners are listed.
0
 
LVL 16

Accepted Solution

by:
Jon Brelie earned 2000 total points
ID: 35487148
So would the script look like this? all together...

C:\Windows\system32>"C:\Program Files\Microsoft\Exchange Server\V14\Scripts\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerToAdd "Giant""

No.  It would look like this:
"C:\Program Files\Microsoft\Exchange Server\V14\Scripts\AddReplicaToPFRecursive.ps1 -TopPublic Folder "\" -ServerToAdd "Giant""

Open in new window

0
 

Author Comment

by:Rasheedlh
ID: 35487171
How do I cd to the root directory? when Exchange Managementshell comes up I am automatically in C:\Windows\System32>
0
 

Author Comment

by:Rasheedlh
ID: 35487202
Am I checking to see if replication is on 2003 Exchange or 2010, i am not seeing anyting in 2010
0
 
LVL 16

Expert Comment

by:Jon Brelie
ID: 35487223
You didn't say that you are partnering 2003 to 2010.

As far as I know, it cannot be done with Powershell and has to be done through the 2003 version of ESM.  
0
 

Author Comment

by:Rasheedlh
ID: 35487263
ohhh!!!! should I run the script on 2003 Exchange? and then run the .\Moveallreplicas.ps1 on 2010 exchange or do everything on 2003 exchange?
0
 
LVL 16

Expert Comment

by:Jon Brelie
ID: 35487598
You cannot run the script on exchange 2003.  There is no powershell.  You must set replica partners through ESM.
0
 

Author Comment

by:Rasheedlh
ID: 35492875
When I try to move Replica in ESM, a window pops up with a clock, but nothing seems to be propagating to subfolders....Any ideas???
0
 
LVL 16

Expert Comment

by:Jon Brelie
ID: 35493568
What version of 2010 are you using?
0
 

Author Comment

by:Rasheedlh
ID: 35493601
I am using Standard, in my efforts to determine why I can not run AddReplica script, I came across a blog that suggested upgrading to exchange 2010 sp1, because of know Public Folder replication issues in exchange 2007/2010. What do you think about this?
0
 
LVL 16

Expert Comment

by:Jon Brelie
ID: 35493849
Yes, you should be on SP1 before you try sorting out public folder issues.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month18 days, 11 hours left to enroll

834 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