The following sample script will create a job diagnostics file, also known as DTInfo. The file will be located in the \Service\Data directory where you installed Double-Take. This is a file you may want to give to technical support if you are troubleshooting a job. There will be a separate file for each job on your target. You will need to modify this script to fit your environment and configuration.
Be sure and expand your screen wide enough so that lines in the script file do not wrap.
# Sample script to create a job diagnostics files
# Specify the variables to be used in the script
# Target server and credentials $DtTargetName = "beta" $DtTargetUserName = "domain\administrator" $DtTargetPassword = "password"
# Import the Double-Take PowerShell module # This may be \Service\ or \Console\ depending on your installation Import-Module "C:\Program Files\Vision Solutions\Double-Take\Console\DoubleTake.PowerShell.dll"
# Login to your target server $DtTarget = New-DtServer -Name $DtTargetName -UserName $DtTargetUserName -Password $DtTargetPassword
# Get the jobs on the target and pass through to create a diagnostics file Get-DtJob -ServiceHost $DtTarget | Save-DtJobDiagnostics -ServiceHost $DtTarget
# Close the connections for the server object Disconnect-DtServer -ServiceHost $DtTarget |
If you want to hide your user credentials in your script, use the Windows PowerShell Get-Credential cmdlet. The password will not be visible because Windows stores an encrypted password. See Hiding your password in a PowerShell script for basic details on using this cmdlet. See your Windows PowerShell documentation for detailed instructions.