Click or drag to resize

Invoke-DtAddShares

This cmdlet takes the drive share configuration that was gathered during Double-Take mirroring and replication and applies it to the target server. This process is independent of the failover process. For this cmdlet, the -ServiceHost should be your target server.

Syntax

Invoke-DtAddShares [-JobXmlPath] <String> [-SharePathFilter] <String> [-ServiceHost] <Server> [<CommonParameters>]

Parameters
-JobXmlPath<String>

Specify the path and file name to the Double-Take .xml configuration file for the job that contains the protected shares. By default, this location is \Program Files\Vision Solutions\Double-Take\Service\Data. The file name will be JobGuid.xml where Guid is the unique identifier assigned to the job. You can find this ID by using Get-DtJob.

Required?

true

Position?

2

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SharePathFilter<String>

Creates shares from the specified path and any subdirectories of this path.

Required?

false

Position?

3

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServiceHost<Server>

Specify the server object returned from the New-DtServer cmdlet.

Required?

true

Position?

1

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.

Examples

------------------EXAMPLE------------------

A server object is created for the server beta using the domain\administrator and password credentials. It assigns the server object to the variable called DtServerObjectBeta. All job information for all of the jobs on the server beta are stored in the variable DtJobInfo. This type of usage is common when the jobs were created in the past or if you did not store or do not know a job's ID. In this example, assume there is only one job on the server. Job id from the stored job information is stored in the variable JobId. The path to the location of the job file is stored in the variable PathToJobFile. The extension of the job file is stored in the variable JobFileExtension. The variables are appended, together with the word Job, to create the variable JobFile. For example, the JobFile variable might end up being C:\Program Files\Vision Solutions\Double-Take\Service\Data\Job87667a0d-4516-4182-ab8f-13f6fd15dd92.xml. Shares are then added on the server DtServerObjectBeta using the job configuration file stored in JobFile. The connections for the server object are then closed.

$DtServerObjectBeta = New-DtServer -Name beta -UserName domain\administrator -Password password

$DtJobInfo = Get-DtJob -ServiceHost $DtServerObjectBeta

$JobId = $DtJobInfo.Id

$PathToJobFile = "C:\Program Files\Vision Solutions\Double-Take\Service\Data\"

$JobFileExtension = ".xml"

$JobFile = $PathToJobFile + "Job" + $JobId + $JobFileExtension

Invoke-DtAddShares –ServiceHost $DtServerObjectBeta –JobXmlPath $JobFile

Disconnect-DtServer –ServiceHost $DtServerObjectBeta