PowerShell script exchange
Post Reply
hens
Novice
Posts: 3
Liked: never
Joined: Oct 29, 2019 8:12 am
Full Name: Hen Suissa
Contact:

Export to csv Job

Post by hens »

Hi, I want to export all the virtual machines I have under each job to Excel file Is it possible with POWERSHELL? If so, what is the command?
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Export to csv Job

Post by oleg.feoktistov » 1 person likes this post

Hi Hen,

Sure. You can export it to a csv file using export-csv cmdlet with a path specified.
Like this:

Code: Select all

$jobs = get-vbrjob
foreach ($job in $jobs) {
  get-vbrjobobject -job $job | export-csv 'C:\VMsInJobs.csv'
}
Best regards,
Oleg
hens
Novice
Posts: 3
Liked: never
Joined: Oct 29, 2019 8:12 am
Full Name: Hen Suissa
Contact:

Re: Export to csv Job

Post by hens »

Hi Oleg,

thank you very much!!
Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests