Hi Guys,
Any one got script which checks backup schedule at certain interval, if backup schedule is suppose to run on Thursday @ 4.00 PM , before 30 min, it call one software (basically VPN client exe) and VPN client connects automatically( this part will be take care by VPN client, we just need to trigger VPN client). Before calling VPN client it needs to check for if LAN interface has DNSDomain name=xyz.local, if yes, then do nothing, if no then call for VPN client .exe
Reason for doing so,
When we use veeam agent to backup computer on local repository and when computer moves out of local network, example public wifi, backup fails so we want to force system to connect to VPN and do the backup.
Why to check for DNSDomain name
We have got multiple location and all the locations are connected to site to site VPN, so logical connectivity exist and veeam agent can reach to repository from any branch office. If we try to run VPN client, it will not get connected since computer is already connected by VPN(site to site VPN) and it will attempt again to connect by vpn client. So just want to avoid such kind of scenario.
Thanks,
Govi
-
- Expert
- Posts: 101
- Liked: 8 times
- Joined: Sep 26, 2017 11:38 am
- Full Name: Govinda Naik
- Contact:
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: powershell script to check backup schedule
The script should
- check NextRun property
- Compare it with current date
- Run the given software if the difference is 30 minutes or less
By the way, what type of job are you planning to check? Backup, backup copy, replication? I'm wondering as the approach to checking NextRun property might be a bit different, depending on the job type.
Thanks!
- check NextRun property
Code: Select all
asnp VeeamPSSnapin
$Job = Get-VBRJob -name "Name of your job"
$Job.ScheduleOptions.NextRun
- Run the given software if the difference is 30 minutes or less
By the way, what type of job are you planning to check? Backup, backup copy, replication? I'm wondering as the approach to checking NextRun property might be a bit different, depending on the job type.
Thanks!
-
- Expert
- Posts: 101
- Liked: 8 times
- Joined: Sep 26, 2017 11:38 am
- Full Name: Govinda Naik
- Contact:
Re: powershell script to check backup schedule
Hi,
Thanks for the reply. I m trying to check backup job(basically increments).
Thanks,
Govi
Thanks for the reply. I m trying to check backup job(basically increments).
Thanks,
Govi
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: powershell script to check backup schedule
OK, then, the described approach should work fine. Thanks!
Who is online
Users browsing this forum: No registered users and 8 guests