cancel
Showing results for 
Search instead for 
Did you mean: 

Powershell and job history

tolinrome
Level 4

Hello,

I'm trying to find a way in which I can run the Powershell command "Get-BEJobHistory" on remote machines and have the value for "TotalDataSizeBytes" changed to GB instead. I can easily run  "Get-BEJobHistory | fl" on the local server, but in an environment with many backup servers it would be very useful to be able to run a script with all the servers in it and return the datasize in GB format. btw, I do not know scripting.

Can anyone help with this? Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

pkh
Moderator
Moderator
   VIP    Certified

To convert bytes to GB in Powershell, just divide the value by 1GB, e.g.

$bytes = 123455758625

$gb = $bytes/1GB

View solution in original post

1 REPLY 1

pkh
Moderator
Moderator
   VIP    Certified

To convert bytes to GB in Powershell, just divide the value by 1GB, e.g.

$bytes = 123455758625

$gb = $bytes/1GB