-
- Expert
- Posts: 230
- Liked: 41 times
- Joined: Feb 18, 2011 5:01 pm
- Contact:
Custom scripts for verifying DAG in SureBackup?
I have two Exchange 2010 mailbox DAG members I want to automatically verify using SureBackup. The problem is while the Exch2010 CAS server can be check via the included mail server script, mailbox servers don't respond on port 25. Is there any way to check a mailbox server? Is there a script I can use?
-
- Expert
- Posts: 176
- Liked: 21 times
- Joined: Jul 08, 2011 8:16 am
- Contact:
Re: Custom scripts for verifying DAG in SureBackup?
hi
may there you can build your own powershell script to check something on your exchange server: http://www.msexchange.org/articles_tuto ... part1.html
note, that scripts will be run on backup server and accessing exchange remotly, error code to indicate success has to be 0 (zero). and user who runs the script has to have the adequate rights.
may there you can build your own powershell script to check something on your exchange server: http://www.msexchange.org/articles_tuto ... part1.html
note, that scripts will be run on backup server and accessing exchange remotly, error code to indicate success has to be 0 (zero). and user who runs the script has to have the adequate rights.
-
- Expert
- Posts: 230
- Liked: 41 times
- Joined: Feb 18, 2011 5:01 pm
- Contact:
Re: Custom scripts for verifying DAG in SureBackup?
A couple questions regarding that:
- Are there any sample scripts I can start from?
- Are there any tutorials or documentation for writing verification scripts for Veeam?
- Are there any sample scripts I can start from?
- Are there any tutorials or documentation for writing verification scripts for Veeam?
-
- Expert
- Posts: 176
- Liked: 21 times
- Joined: Jul 08, 2011 8:16 am
- Contact:
Re: Custom scripts for verifying DAG in SureBackup?
there is vmconnectiontester.exe to check different network ports than the standard ones. for scripts, there are no "samples", but you should be able to use remote powershell for example.
regarding documentation, as far as i know, there is no "official" one. ecept what i say above
on part 4 of the above mentioned article you see some examples http://www.msexchange.org/articles_tuto ... part4.html
regarding documentation, as far as i know, there is no "official" one. ecept what i say above
maybe there are some test scenarios and the scripts in the forum, try with forum/google search.vMO wrote:that scripts will be run on backup server and accessing exchange remotly, error code to indicate success has to be 0 (zero)
on part 4 of the above mentioned article you see some examples http://www.msexchange.org/articles_tuto ... part4.html
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Custom scripts for verifying DAG in SureBackup?
There is no documentation, but you may want to take a look a this blog post, which has a detailed description of SureBackup script creation and management: http://www.veeam.com/blog/automate-reco ... ackup.html
-
- Expert
- Posts: 230
- Liked: 41 times
- Joined: Feb 18, 2011 5:01 pm
- Contact:
Re: Custom scripts for verifying DAG in SureBackup?
Again, sorry to bring up an old thread, but hopefully it might help someone.
This is the PS script I use in SureBackup to see if the Exchange services are running on my mailbox servers:
REM Start-Sleep -s 60
# Start Exchange services on Mailbox servers
Start-Service -InputObject $(Get-Service -Computer <IP> -Name MSExchangeIS)
Start-Service -InputObject $(Get-Service -Computer <IP> -Name MSExchangeSA)
Start-Service -InputObject $(Get-Service -Computer <IP> -Name MSExchangeServiceHost)
REM Start-Sleep -s 60
# Check Exchange services Status
$ExchSvc = (get-service -ComputerName <IP> -Name MSExchangeIS -ErrorAction SilentlyContinue)
IF($ExchSvc.status -ne "Running"){$host.SetShouldExit(1)}
$ExchSvc = (get-service -ComputerName <IP> -Name MSExchangeSA -ErrorAction SilentlyContinue)
IF($ExchSvc.status -ne "Running"){$host.SetShouldExit(1)}
$ExchSvc = (get-service -ComputerName <IP> -Name MSExchangeServiceHost -ErrorAction SilentlyContinue)
IF($ExchSvc.status -ne "Running"){$host.SetShouldExit(1)}
Exit
And the batch file which SureBackup actually runs:
powershell.exe -noninteractive -noprofile -command "& {C:\batches\exchangehub.ps1}"
EXIT /B %errorlevel%
This is the PS script I use in SureBackup to see if the Exchange services are running on my mailbox servers:
REM Start-Sleep -s 60
# Start Exchange services on Mailbox servers
Start-Service -InputObject $(Get-Service -Computer <IP> -Name MSExchangeIS)
Start-Service -InputObject $(Get-Service -Computer <IP> -Name MSExchangeSA)
Start-Service -InputObject $(Get-Service -Computer <IP> -Name MSExchangeServiceHost)
REM Start-Sleep -s 60
# Check Exchange services Status
$ExchSvc = (get-service -ComputerName <IP> -Name MSExchangeIS -ErrorAction SilentlyContinue)
IF($ExchSvc.status -ne "Running"){$host.SetShouldExit(1)}
$ExchSvc = (get-service -ComputerName <IP> -Name MSExchangeSA -ErrorAction SilentlyContinue)
IF($ExchSvc.status -ne "Running"){$host.SetShouldExit(1)}
$ExchSvc = (get-service -ComputerName <IP> -Name MSExchangeServiceHost -ErrorAction SilentlyContinue)
IF($ExchSvc.status -ne "Running"){$host.SetShouldExit(1)}
Exit
And the batch file which SureBackup actually runs:
powershell.exe -noninteractive -noprofile -command "& {C:\batches\exchangehub.ps1}"
EXIT /B %errorlevel%
Who is online
Users browsing this forum: No registered users and 89 guests