Advertisement
Guest User

Untitled

a guest
Feb 6th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Add-PSSnapin VeeamPSSnapin
  2.  
  3. $username = "VEEAM-VKS\Veeam"
  4. $password = "well#15!"
  5. $hostname = "192.168.50.17"
  6.  
  7. Connect-VBRServer -Server $hostname -User $username -Password $password
  8. $jobs = Get-VBRJob
  9.  
  10. $jobs
  11.  
  12.  
  13. foreach ($job in $jobs)
  14. {
  15.  
  16.  
  17. $type=$($job.JobType)
  18.  
  19. if ($type -eq "Backup" ) {
  20. $a=$job.ScheduleOptions
  21. $lastrun = $a.LatestRunLocal.tostring()
  22. $nextrun = $a.NextRun
  23.  
  24. $a.nextrun
  25.  
  26. $nextrun
  27.  
  28. "$($job.id)##$($job.Name)##$($job.Description)####auto.last=$lastrun&auto.next=$nextrun"
  29.  
  30.  
  31.  
  32. }
  33.  
  34. }
  35. Disconnect-VBRServer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement