Previous Topic: Using CA ARCserve RHA PowerShell Commands

Resume-Scenario - Resume Replication on a Suspended Replica

The Resume-Scenario command enables you to resume the replication process on a suspended Replica host. Once the replication is resumed, the accumulated changes are transferred and applied to the Replica without any need to perform a full re-synchronization of the data.

Syntax
Resume-Scenario [-Name] <String> [-Host] <String>
Parameters
Name

The scenario name.

Host

The name of the suspended Replica host you want to resume.

Example: Resume the replication process on a suspended Replica

resume-scenario "File Server 1" 192.168.1.153

Outcome:

Scenario File Server 1 resumed on 192.168.1.153

Run-Scenario - Start a Scenario

The Run-Scenario command enables you to start one or several scenarios.

Syntax
Run-Scenario [-Name] <String> [-Mode] <String> [-Ignore] <Boolean> 
Parameters
Name

The scenario name. You can enter several scenario names by using the Get-Scenario command.

Mode

The synchronization mode. Enter one of the following:

B=Binary

F=File

Ignore

Ignore files of the same name and size during the data comparison. Enter one of the following:

1=Yes

0= No

Notes:

Example: Start a scenario

run-scenario "File Server 1" F 1

Outcome:

Scenario File Server 1 Starting...

Run-Assessment - Run a Scenario in Assessment Mode

The Run-Assessment command enables you to assess the accurate bandwidth usage and compression ratio benchmarking that is needed for replication, without actually replicating data. When you run this command, no replication occurs but statistics are gathered. A report is provided once the assessment process is stopped.

Important! Do not forget to stop the scenario that runs in Assessment Mode after the period you wanted to assess has passed, by using the Stop-Scenario command.

Note: To view the Assessment Report after its generation, open the Report Center from the Overview Page, and select the required report.

Syntax
Run-Assessment [-Name] <String>
Parameters
Name

The scenario name.

Example: Run a scenario in Assessment Mode

run-assessment "File Server 1"

Outcome:

Scenario File Server 1 executed successfully

Set-Bookmark - Set a Rewind Bookmark

A bookmark is a checkpoint that is manually set to mark a state that you may want to rewind back to. The Set-Bookmark enables you to set a bookmark for a given scenario. Bookmarks are set in real-time, and not for past events. We recommend setting a bookmark just before any activity that may cause data to become unstable.

Notes:

Syntax
Set-Bookmark [-Name] <String> [[-Message] <String>]
Parameters
Name

The name of the scenario.

Message (Optional)

The name of the bookmark. The default name includes the date and time of the bookmark setting.

Note: We recommend giving a meaningful name to the bookmark that will later help you recognize it.

Example: Set a rewind bookmark

set-bookmark "File Server 1" Backup1

Outcome:

Scenario File Server 1: Rewind bookmark set successfully

Stop-Scenario - Stop a Scenario

The Stop-Scenario command enables you to stop one or several scenarios.

Note: To check if the operation was completed successfully, use the Get-Scenario and Get-Events commands.

Syntax
Stop-Scenario [-Name] <String>  
Parameters
Name

The name of the scenario you want to stop. You can enter several scenario names by using the Get-Scenario command.

Example: Stop a scenario

stop-scenario "File Server 1"

Outcome:

Scenario File Server 1 stopped

Suspend-IsAliveCheck - Suspend IsAlive Checking of a Running Scenario

The Suspend-IsAliveCheck command lets you manually suspend IsAlive checking for a given running HA scenario.

Syntax
Suspend-IsAliveCheck [-ScenarioName] <String>  
Parameters
ScenarioName

The scenario name.

Example: Suspend IsAlive checking of SQLscenario

Suspend-IsAliveCheck SQLscenario

Outcome:

Suspends periodic is-alive checking of SQLscenario.

Suspend-Scenario - Suspend Updates on a Replica

The Suspend-Scenario command enables you to temporarily cease delivering changes to a suspended Replica. During the suspension, changes are accumulated in a spool until replication is resumed so that re-synchronization is not required.

Important! It is imperative that during suspension, you do nothing on the Replica that causes the data to change in any way, including starting an application such as Exchange Server, SQL Server, or Oracle. If you need to start programs that will change data on the Replica, you may use the Assured Recovery option.

Notes:

Syntax
Suspend-Scenario [-Name] <String> [-Host] <String> 
Parameters
Name

The scenario name.

Host

The Replica host you want to suspend.

Example: Suspend updates on a Replica

suspend-scenario "File Server 1" 192.168.1.153

Outcome:

Scenario File Server 1 Suspended on 192.168.1.153

Switchover-Scenario - Perform a Switchover

The Switchover-Scenario command enables you to start the switchover process for a given HA scenario. To switch back the roles between the Master and the Replica, use the Switchover-Scenario command again.

Syntax
Switchover-Scenario [-Name] <String> 
Parameters
Name

The scenario name.

Example: Perform a switchover

Switchover-Scenario "SQL Server 1"
Outcome
Scenario SQL Server 1 switching over to 192.168.1.153
Done!

Sync-Scenario - Initiate a Synchronization

The Sync-Scenario command enables you to synchronize the Master and the Replica of a given scenario. The synchronization process can be manually activated at any time, whether replication is running or not.

Syntax
Sync-Scenario [-Name] <String> [-Mode] <String> [-Ignore] <Boolean> 
Parameters
Name

The scenario name. You can enter several scenario names by using the Get-Scenario command.

Mode

The synchronization mode. Enter one of the following:

B=Binary

F=File

Ignore

Ignore files of the same name and size during the data comparison. Enter one of the following:

1=Yes

0= No

Example: Initiate a synchronization

sync-scenario "File Server 1" F 1

Outcome:

Synchronization is running for scenario FS 1...
Done!

Test-Integrity - Perform Integrity Test for Assured Recovery

The Test-Integrity command enables you to activate an automatic integrity test on a Replica host for assured recovery.

Notes:

Syntax
Test-Integrity [-Name] <String> [-Host] <String>
Parameters
Name

The name of the scenario.

Host

The IP address or hostname of the Replica host you want to test.

Example: Perform Integrity Test for Assured Recovery

Test-Integrity "Exchange Server 1" 192.168.1.153
Outcome
Integrity testing for assured recovery started on 192.168.1.153
Done!
Integrity testing for assured recovery completed on 192.168.1.153

Unmount-Snapshot - Unmount a Snapshot

The Unmount-Snapshot command enables you to release an exposed snapshot without losing the snapshot itself. The snapshot is still exposed but it does not use a mount point.

Syntax
Unmount-Snapshot [-Name] <String> [[-Index] [<Int32>]] [[-Port] [<String>]]
Parameters
Name

The name of the host whose snapshot you want to expose.

Index

The index no. of the snapshot, as returned by the Get-Snapshot command.

Port (Optional)

The port that is used for connecting to the given host. The default port is 25000.

Example: Unmount a snapshot

Unmount-Snapshot {97127d0b-f1c9-4db5-943d-96c39b712fe6} 1 
Outcome
Snapshot {97127d0b-f1c9-4db5-943d-96c39b712fe6} unmounted

Editing Commands

This section describes CA ARCserve RHA PowerShell commands that enable you to edit scenarios and scenario groups.

Add-Dir - Add Root Directories to the Master and Replica Hosts

The Add-dir command enables you to add root directories to the Master and Replica hosts. You can define the same root dirrectory path for both the Master and Replica, or you can enter two different paths. If you do not enter a different path for the Replica, by default it will be the same as the Master path.

Syntax
Add-Dir [-Name] <String> [-MasterPath] <String> [[-ReplicaPath] [<String>]]  
Parameters
Name

The scenario name.

MasterPath

The full path of the root directories on the Master.

ReplicaPath (Optional)

The full path of the root directories on the Replica(s). If no value is entered, the same path will be used for the Master and Replica.

Example: Add the same root directory to the Master and the Replica

add-dir "File Server 1" C:/Tools
Outcome
Root Directory: C:/Tools added successfully

Add-Group - Create a Scenario Group

The Add-Group command enables you to create a new scenario group.

Note: When no scenario is assigned, empty scenario groups do not appear on the Overview Page.

Syntax
Add-Group [-Name] <String> 
Parameters
Name

The name of the new scenario group.

Note: Enter a unique name, since you cannot use the same name for more than one scenario group. If you use an existing name for the new group, the system will change it automatically.

Example: Create a new scenario group

add-group "File Server Scenarios"
Outcome
Group File Server Scenarios added successfully

Add-Master - Add a Master Host to a Scenario

The Add-Master command enables you to add a Master host to a given scenario. When defining a Master host, you need to enter its hostname. In addition, you can also enter the Master IP address, but this parameter is not mandatory.

Notes:

Syntax
Add-Master [-Name] <String> [-Host] <String> [[-IP] [<String>]] 
Parameters
Name

The name of the scenario.

Host

The hostname of the new Master.

IP (optional)

The IP address of the new Master. If no IP address is defined, by default the system seeks it by using the specified hostname, and uses the first IP address it finds. For this reason, if the host has multiple IP addresses, we recommend to enter here the IP address you want to use.

Example: Add a Master host to a scenario

add-master "File Server 1" 130.119.185.152
Outcome
Master 130.119.185.152 added successfully

Add-Replica - Add a Replica Host to a Scenario

The Add-Replica command enables you to add a Replica host to a given scenario. When defining a Replica host, you need to enter its hostname, and optionally, its IP address as well. Then, you need to enter its parent host, which can be either the Master or another Replica.

Note: You can enter the IP address as the hostname.

When using ACL security delegations, you need to enter the values of three additional parameters: UserName, Password, and DomainName.

Syntax
Add-Replica [-Name] <String> [-Host] <String> [[-IP] [<String>]] [-Parent] <String> [[-UserName] <String>] [[-Password] <String>] [[-DomainName] <String>]
Parameters
Name

The name of the scenario.

Host

The hostname of the new Replica.

IP (optional)

The IP address of the new Replica. If no IP address is defined, by default the system seeks it by using the specified hostname, and uses the first IP address it finds. For this reason, if the host has multiple IP addresses, we recommend to enter here the IP address you want to use.

Parent

The parent host of the new Replica host. The parent can be either the Master or an upstream Replica, and you can use either its hostname or IP address.

UserName; Password;DomainName (ACL only)

The User Name, password and domain of a user, who has the right to add a new Replica host.

Example: Add a Replica host to a scenario

add-replica "File Server 1" 130.119.185.153 -parent 130.119.185.152
Outcome
Replica 130.119.185.153 added successfully

Add Replicas - Add Multiple Replica Hosts to a Scenario

The Add-Replicas command enables you to add multiple Replica hosts at once to a given scenario. To add multiple Replica hosts, you need to create a text file that contains the hostnames and IP addresses of the hosts. When you use the command, first define the scenario name and the parent host of all the Replica hosts you want to add. Then, specify the name and path of the file that contains the details of the new hosts.

Syntax
Add-Replicas [-ScenarioName] <String> [-ParentHost] <String> [-FileName] <String>
Parameters
ScenarioName

The name of the scenario.

ParentHost

The parent host of the new Replica host. The parent can be either the Master or an upstream Replica, and you can use either its hostname or IP address.

FileName

A text file that contains the host names and their IP addresses. The text should be formatted as follows:

#host name IP address

QA95-W2K3-SQL1 *130.119.185.155

QA95-W2K3-EX2 *130.119.185.153

UserName; Password;DomainName (ACL only)

The User Name, password and domain of a user, who has the right to add new Replica hosts.

Example: Add multiple Replica hosts to a scenario

add-replicas "Exchange Server" QA95-W2K3-EX1 D:\New_Replica_Hosts.txt
Outcome
130.119.185.151 QA95-W2K3-EX1
130.119.185.152 QA95-W2K3-EX2
2 replicas were added.

Add-Scenario - Create a New Scenario

The Add-Scenario command enables you to create a new scenario. When creating a new scenario, you need to define the following:

The new scenario is created without hosts and root directories. You define these parameters at a later stage, using the Add-Master, Add-Replica and Add-Dir commands.

Syntax
Add-Scenario [-Name] <String> [[-Group] [<String>]] [[-Application] [<String>]] [[-Type] [<String>]] [[-AR] [<Boolean>] 
Parameters
Name

The name of the new scenario.

Note: Enter a unique name, since you cannot use the same name for more than one scenario. If you will use an existing name for the new scenario, the system will change it automatically.

Group (optional)

The scenario group name that contains the new scenario.

Notes:

  • If you do not enter a group name, the new scenario is assigned to the default Scenarios group.
  • You can create here a new scenario group, by entering a new group name. You can also create a new scenario group by using the Add-Group command.
Application

The type of server whose data will be replicated:

  • EX - Exchange
  • SQL - SQL server
  • ORA - Oracle
  • IIS - Internet Information Server
  • FS - File Server
Type

The type of solution:

  • DR - Replication/Disaster Recovery
  • HA - High Availability
AR

Whether to perform an Assured Recovery test of the recoverability of the data on the Replica server:

  • 0 - No
  • 1 - Yes

Example: Create a new scenario

add-scenario "File Server 1" "File Server Scenarios" FS DR 0
Outcome
Scenario File Server 1 added successfully

Remove-Dir - Remove Root Directories from the Master and Replica

The Remove-Dir command enables you to remove root directories from the Master and Replica hosts.

Note: You cannot remove a root directory only from the Replica using this command. Once you remove the Master root directories, the corresponding Replica root directories will be removed as well.

Syntax
Remove-Dir [-Name] <String> [-MasterPath] <String> 
Parameters
Name

The name of the scenario.

MasterPath

The root directory path on the Master.

Example: Remove a root directory from the Master and Replica

remove-dir "File Server 1" C:/Tools

Outcome:

Root Directory: C:/Tools removed

Remove-Group - Delete a Scenario Group

The Remove-Group command enables you to delete a given scenario group.

Note: You can only remove an empty scenario group. If you want to remove a group that contains scenarios, first you need to remove the scenarios.

Syntax
Remove-Group [-Name] <String> 
Parameters
Name

The name of the scenario group you want to delete.

Example: Delete a scenario group

remove-group "new group 1"
Outcome
Group new group 1 removed

Remove-Replica - Remove a Replica Host from a Scenario

The Remove-Replica command enables you to remove a Replica host from a given scenario.

Syntax
Remove-Replica [-Name] <String> [-Host] <String> [-Parent] <String>
Parameters
Name

The name of the scenario.

Host

The name of the Replica host you want to remove.

Parent

The parent of the Replica host you want to remove in the replication tree. It can be either the Master or an upstream Replica.

Example: Remove a Replica host from a scenario

remove-replica "FS 1" 130.119.185.153 -parent 130.119.185.152
Outcome
Replica 130.119.185.153 removed   

Remove-Scenario - Delete a Scenario

The Remove-Scenario command enables you to delete a given scenario.

Note: You cannot delete a running scenario.

Syntax
Remove-Scenario [-Name] <String> 
Parameters
Name

The name of the scenario you want to delete.

Example: Remove a scenario

remove-scenario "File Server 2"
Outcome
Scenario File Server 2 removed

Rename-Group - Rename a Scenario Group

The Rename-Group command enables you to change the name of a given scenario group.

Syntax
Rename-Group [-Name] <String> [-NewName] <String> 
Parameters
Name

The current name of the scenario group.

NewName

The new name for the scenario group.

Note: Enter a unique name, since you cannot use the same name for more than one scenario group. If you use an existing name for the scenario group, the system changes it automatically.

Example: Rename a scenario group

rename-group Server "Exchange Server Scenarios"
Outcome
Group Server renamed!

Rename-Scenario - Change a Scenario Name

The Rename-Scenario command enables you to change the name of a given scenario.

Note: You cannot rename a running scenario. To change its name, you need to stop it first.

Syntax
Rename-Scenario [-Name] <String> [-NewName] <String> 
Parameters
Name

The current name of the scenario.

New Name

The new name for the scenario.

Example:

rename-scenario "File Server 1" "File Server"
Outcome
Scenario File Server 1 renamed!

Commands for Changing Scenarios While Running

You may now change certain scenario properties while a scenario is running. This section lists the syntax and examples for the commands that apply to editing a scenario while it is running.

Apply-AllPendingRuntmeChangeableScenarioProperties

The Apply-AllPendingRuntimeChangeableScenarioProperties command lets you apply all changes to all changed scenarios at run time.

Syntax
Apply-AllPendingRuntimeChangeableScenarioProperties
Parameters

None

Example

Suppose you changed properties on several scenarios. Those changes are all pending. To apply them immediately use this command.

Apply-PendingRuntimeChangeableScenarioProperties

The Apply-PendingRuntimeChangeableScenarioProperties command lets you apply all changes to the specified running scenario.

Syntax
Apply-PendingRuntimeChangeableScenarioProperties [Name]
Parameters

Name - The name of the running scenario you wish to change.

Example

The following command applies changes to the scenario called FileServer:

Apply-PendingRuntimeChangeableScenarioProperties FileServer
Outcome

The result is a list of properties and their values:

error_source : engine_verification_error

error_level: Error

host_index: 2

root_dir_index: 0

property_xpath: Scenario.ReplicationTree.ReplNode.ReplNode.SpecificReplicaProps. ReplicaScheduledTask.Suspend.SuspendScript.Path


Discard-AllPendingRuntimeChangeableScenarioProperties

The Discard-AllPendingRuntimeChangeableScenarioProperties command cancels all the changes you configured for all scenarios.

Syntax
Discard-AllPendingRuntimeChangeableScenarioProperties
Parameters

None

Discard-RuntimeChangeableScenarioProperties

The Discard-RuntimeChangeableScenarioProperties command lets you cancel any changes made on the specified running scenario.

Syntax
Discard-RuntimeChangeableScenarioProperties [Name]
Parameters

Name - This is the name of the running scenario for which you wish to discard changes.

Example

If you have made numerous changes to a running scenario called FileServer and discover problems, use the following command to set the scenario back to all original values:

Discard-RuntimeChangeableScenarioProperties FileServer
Outcome

All changes made to the scenario called FileServer are reset back to their original values.

If you wish to set only a specific property back to its original value, use the Set-RuntimeChangeableScenarioProperties command to change only the specified property for the running scenario. Note that when you have discarded changes, all records in the Get-AllPendingRuntimeChangeableScenarioProperties list are deleted. Running Apply-PendingRuntimeChangeableScenarioProperties results in a warning message that the specified scenario was not changed at run time.

Get-AllPendingRuntimeChangeableScenarioProperties

The Get-AllPendingRuntimeChangeableScenarioProperties command lists all the scenarios that were changed while running.

Syntax
Get-AllPendingRuntimeChangeableScenarioProperties
Parameters

None

Example

The following command lists all the scenarios changed while running.

Get-AllPendingRuntimeChangeableScenarioProperties
Outcome

The result is a list of scenario names.

Get-AllRuntimeChangeableScenarioProperties

The Get-AllRuntimeChangeableScenarioProperties command enables you to list all the properties that can be changed while any scenario is running.

Syntax
get-AllRuntimeChangeableScenarioProperties
Parameters

None

Example:

The following code issues the command to list all editable properties and redirect the output to a text file.

Get-AllRuntimeChangeableScenarioProperties > d:\1.txt
Outcome

The result is a set of the editable properties in Scenario/Master/Replica/PropertyName format.

Get-RuntimeChangeableScenarioProperties

The Get-RuntimeChangeableScenarioProperties command enables you to find all the properties you can edit while the specified scenario is running. The command returns a list of the properties you may change for that scenario. Combine with I/O redirection commands to format output to a text file.

Syntax
Get-RuntimeChangeableScenarioProperties [Name]
Parameters

Name - the name of the running scenario

Example:

The following command lists all the editable properties for the scenario called File Server Scenario 1:

Get-RuntimeChangeableScenarioProperties FileServerScenario1
Outcome

Property: False

Host: 10.0.0.0

Value: False

Index: 111

Category: Replica

Name: SpecificReplicaProps.Suspend.SuspendScript

Get-PendingRuntimeChangeableScenarioProperties

The Get-PendingRuntimeChangeableScenarioProperties command lets you list all the changes made to the specified running scenario.

Syntax
Get-PendingRuntimeChangeableScenarioProperties [Name]
Parameters

Name - The name of the running scenario

Example:

The following example shows the list of all properties changed for the scenario called FileServer:

Get-PendingRuntimeChangeableScenarioProperties FileServer
Outcome

The result is a list of Properties, their Original Values and their New Values.

Set-RuntimeChangeableScenarioProperty

The Set-RuntimeChangeableScenarioProperty command enables you to update the value of the specified property in the named scenario while it is running.

Syntax
Set-RuntimeChangeableScenarioProperty [Name] [Index] [Value] [Host]
Parameters

Name - The name of the running scenario whose properties you wish to change.

Index - The index or name of the property you want to change. To determine correct names, use the Get-AllRuntimeChangeableScenarioProperties or the Get-RuntimeChangeableScenarioProperties commands. The index value is generated internally; for two scenarios even of the same type, the same property can have a different index. Ensure you obtain the correct indexes or names.

Value - The new setting for the specified property.

Host - (Optional) The host needs to be specified only for Master or Replica property changes. For generic or HA properties, this value is optional.

Example:

The following command updates the argument of the suspend script property based on its name:

Set-RuntimeChangeableScenarioProperty FileServer SpecificReplicaProps.Suspend.SuspendScript 456 -Host 10.0.0.1
Outcome

The result is a table showing the Property, its Original Value and the New Value.

Test-RuntimeChangeableScenarioProperty

The Test-RuntimeChangeableScenarioProperty command lets you confirm whether the specified property can still be edited while the scenario is running.

Syntax
Test-RuntimeChangeableScenarioProperty [Name] [Index] [Host]
Parameters

Name - The name of the running scenario

Index - The index or name of the property you wish to test

Host - Optional

Example

The following command tests the property whose index is 113 for a running scenario called FileServer.

Test-RuntimeChangeableScenarioProperty FileServer 113 -host 10.0.0.3
Outcome

The result is a true or false value for the index or property name specified.

Monitoring commands

This section describes CA ARCserve RHA PowerShell commands that enable you to monitor the DR and HA processes.

Get-Dirs - List all Root Directories of a Scenario

The Get-Dirs command enables you to list all root directories of a given scenario.

Syntax
Get-Dirs [-Name] <String> 
Parameters
Name

The scenario name.

Example: List the root directories of a given scenario

get-dirs "File Server 1"
Outcome
ID       : 2721474912
Scenario : File Server 1
Master   : 192.168.1.152
Path     : C:/Tools
DB       : False

Get-Events - List all Events of a Scenario

The Get-Events command displays a list of replication events of a given scenario. The event list can include informational, warning and error events. The displayed information consists of the event ID, the event date and time, the scenario name, the event severity and the event message.

Syntax
Get-Events [-Name] <String> 
Parameters
Name

The name of the scenario whose events you want to view.

Example: List events of a given scenario in an auto-sized format table

get-events "File Server 1" | FT -auto
Outcome
ID      Time                  Scenario      Severity    Message
--      ----                  --------      --------    -------
SM00165 10/28/2008 6:02:52 PM File Server 1 Significant Connected to...
SR00014 10/30/2008 7:17:31 PM File Server 1 Significant Starting...
SR00139 10/30/2008 7:17:35 PM File Server 1 Significant Starting File...
IR00119 10/30/2008 7:18:16 PM File Server 1 Info        Root directory...
SR00120 10/30/2008 7:18:16 PM File Server 1 Significant Synchronization...
IM00405 10/30/2008 7:15:06 PM File Server 1 Info        Posting... 
SR00202 10/30/2008 7:18:21 PM File Server 1 Significant All modifications...
SR00096 11/3/2008 6:47:40 PM  File Server 1 Significant Stopping scenario...

Get-Group - List Groups that carry a Given Name

The Get-Group command enables you to list all scenario groups that carry a given name. To display this list, you need to enter the name you are searching for.

In addition, this command enables you to list all existing scenario groups. To list all scenario groups, just enter the command without a scenario name.

Syntax
Get-group [[-GroupName] [<String>]]
Parameters
Name

The name of the scenario group.

Note: You can use the '*" or "?" wildcards as part of the scenario group name.

Example: List all scenario groups that carry a given name

get-group *Server*
Outcome
File Server Scenarios 2
File Server Scenarios 1
Exchange Server Scenarios
File Server Scenarios

Get-Hosts - List all Hosts of a Scenario

The Get-Hosts command enables you to list all hosts of a given scenario.

Syntax
Get-Hosts [-Name] <String> 
Parameters
Name

The scenario name.

Example: List the hosts of a given scenario in an auto-sized format table

Get-Hosts "File Server 1" |FT -auto
Outcome
Scenario      Name          Role    Parent         State   IP            Port
--------      ----          ----    ------         -----   --            ----
File Server 1 192.168.1.152 Master  --             Running 192.168.1.152 25000
File Server 1 192.168.1.153 Replica 1192.168.1.152 Running 192.168.1.153 25000

Get-Scenario - List Scenarios that carry a Given Name

The Get-Scenario command enables you to list all scenarios that carry a given name. To display this list, you need to enter the name you are searching for.

In addition, this command enables you to list all existing scenarios. To list all scenarios, just enter the command without a scenario name.

Syntax
Get-Scenario [[-Name] [<String>]] 
Parameters
Name

The scenario name.

Note: You can use the '*" or "?" wildcards as part of the scenario name.

Example: List all scenarios that carry a given name in an auto-sized format table

get-scenario File* |FT -auto
Outcome
ID         Group     Name          Type       Master         State   Sync AR
--         -----     ----          ----       ------         -----   ---- --
1123633852 Scenarios FileServer    FileServer                Unknown File False
1123633468 Scenarios File Server 1 FileServer 192.168.1.153  Stopped File False

Get-Snapshot - Display VSS Snapshots of a Replica Host

The Get-Snapshot command enables you to display all VSS snapshots of a given Replica Host.

Syntax
Get-Snapshot [-Name] <String> [[-Port] <String>]
Parameters
Name

The name of the host as it appears in the scenario.

Port (optional)

The connection port to the given host. The default port number is 25000.

Example: Display all VSS snapshots of a given Replica host in an auto-sized format table

Get-Snapshot 130.119.173.7 |FT -auto
Outcome
Index Snapshot        Created               Exposed Mounted     Drive Scenario
----- --------        -------               ------- -------     ----- --------
0     {4f2bb053-5f2d} 11/18/2008 4:03:09 PM False   Not Mounted C:/   FileServer
1     {bcbdda2b-6165} 11/18/2008 4:06:00 PM False   Not Mounted C:/   FileServer
2     {c1f206be-2ad0} 11/18/2008 4:07:17 PM False   Not Mounted C:/   FileServer

Get-State - List all Scenarios defined for a Given Host

The Get-State command enables you to list all the scenarios that are defined for a given host, along with their details and states.

Syntax
Get-State [-Name] <String> 
Parameters
Name

The name of the host.

Example:

get-state 130.119.185.152
Outcome
ID     : 2505374864
Group  : FS Scenarios
Name   : FS 1
Type   : FileServer
Master : 130.119.185.152
State  : Running
Sync   : File
AR     : False

ID     : 2721467841
Group  : File Server Scenarios
Name   : File Server 1
Type   : FileServer
Master : 130.119.185.152
State  : Stopped
Sync   : File
AR     : False

Get-Stats - Display Replication Statistics of a Scenario

The Get-Stats command enables you to display scenario statistic per host during a run.

Syntax
Get-Stats [-Name] <String> 
Parameters
Name

The name of the scenario.

Example: Display replication statistics of a given scenario during a run

get-stats "File Server 1"
Outcome
Scenario    : File Server 1
Name        : 192.168.1.152
Role        : Master
Spool_Size  : 0
Sync_Files  : 345
Sync_MBytes : 86
Rep_MBytes  : 0

Scenario    : File Server 1
Name        : 192.168.1.153
Role        : Replica
Spool_Size  : 0
Sync_Files  : 345
Sync_MBytes : 86
Rep_MBytes  : 0 

User Management Commands

This section describes CA ARCserve RHA PowerShell commands that enable you to monitor and manage User Groups and Users for ACL-based Control Service.

Note: A special license is needed for using the ACL commands.

Get-SuperUserGroup - Display the Super User Group Name

The Get-SuperUserGroup command enables you to display the name of the Super User Group of the connected Control Service.

Syntax
Get-SuperUserGroup

Note: This command does not have parameters.

Example: Display the name of the Super User Group

Get-SuperUserGroup
Outcome
QA95-W2K3-SQL\\CA XOsoft Users

Set-SuperUserGroup - Change the Super User Group

The Set-SuperUserGroup command enables you to change the Super User Group.

Syntax
Set-SuperUserGroup [-GroupName] <String>
Parameters
GoupName

The name of the new Super User group.

Example: Change the Super User Group

Set-SuperUserGroup Administrators
Outcome
Set super user group successfully

Get-Users - List all Users of the Super User Group

The Get-Users command enables you to list all users that belong to the Super User Group.

Syntax
get-users 

Note: This command does not have parameters.

Example: List all users that belong to the Super User Group

get-users
Outcome
QA95-W2K3\Administrator
QA95-W2K3-SQL\User2
QA95-W2K3-SQL\User1

Get-ScenarioUsers - List all Users with Rights on a Scenario

The Get-ScenarioUsers command enables you to list all users that have rights on a certain scenario.

Syntax

get-ScenarioUsers [-ScenarioName] <String>

Parameters
ScenarioName

The name of the scenario.

Example: List all users that have rights on a given scenario

Get-ScenarioUsers "File Server"
Outcome
name
----
QA95-W2K3-SQL\User2
QA95-W2K3-SQL\User1

Set-ScenarioUser - Assign User Rights on a Scenario

The Set-ScenarioUser command enables you to assign to a user certain rights on a specific scenario.

Syntax
Set-ScenarioUser [-Name] <String> [-User] <String> [-Right] <String> 
Parameters
Name

The name of the scenario.

User

The full name of the user.

Right

The type of rights the user will have on the scenario. Enter one of the following:

A = Admin

C = Control

V = View Only

Example: Assign to a user Control rights on a given scenario

Set-ScenarioUser "File Server" QA95-W2K3-SQL\User2 C
Outcome
Set user right successfully

Remove-ScenarioUser - Cancel User Rights on a Scenario

The Remove-ScenarioUser command enables you to cancel the rights of a user on a certain scenario.

Syntax
Remove-ScenarioUser [-Name] <String> [-User] <String>
Parameters
ScenarioName

The name of the scenario.

UserName

The name of the user.

Example: Cancel the rights of a user on a given scenario

Remove-ScenarioUser "File Server" QA95-W2K3-SQL\User2
Outcome
User removed successfully.