PowerShell script exchange
Post Reply
StigSornsen
Novice
Posts: 8
Liked: 1 time
Joined: Nov 17, 2016 2:39 pm
Full Name: Stig Sörnsen
Contact:

Cloud Connect report from Powershell

Post by StigSornsen »

Hey, when I click "Report" when browsing Cloud Connect, then in the report I have Backup - Replication - Agent tables.
However, when making report with Powershell I seem to only get the Backup info.

This is how I do it today:

Code: Select all

        $CloudTenants = Get-VBRCloudTenant

        foreach ($ct in $CloudTenants)
        {
            foreach ($r in $ct.Resources)
            {
                New-Object psobject -Property @{
                    User = $ct.Name
                    'VM Count' = $ct.VMCount
                    'Repository Name' = $r.RepositoryFriendlyName
                    'Total Quota' = NumberFormat -Number $r.RepositoryQuota
                    'Used Space' = NumberFormat -Number $r.UsedSpace
                    'Used Space %' = [string]$r.UsedSpacePercentage + " %"
                    'Free Space' = NumberFormat -Number ($r.RepositoryQuota - $r.UsedSpace)
                    'Last Active' = $ct.LastActive
                    'Last Result' = $ct.LastResult
                    '24hrs Activity' = (Get-Date $ct.LastActive) -gt (Get-Date).AddDays(-1)
                }
            } 
        }
Any hint on getting Agent info, like the Workstation and Server count info?
StigSornsen
Novice
Posts: 8
Liked: 1 time
Joined: Nov 17, 2016 2:39 pm
Full Name: Stig Sörnsen
Contact:

Re: Cloud Connect report from Powershell

Post by StigSornsen »

Here is what I mean :)

Image

And here is what my Powershell script gives me (HTML formatted):

Image

How to get Workstation and Server count info from "Agent"?
veremin
Product Manager
Posts: 20413
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Cloud Connect report from Powershell

Post by veremin » 1 person likes this post

VBRCloudTenant object has two properties: ServerCount and WorkStationCount. Those properties seem to be something you're looking for. Thanks.
StigSornsen
Novice
Posts: 8
Liked: 1 time
Joined: Nov 17, 2016 2:39 pm
Full Name: Stig Sörnsen
Contact:

Re: Cloud Connect report from Powershell

Post by StigSornsen »

v.Eremin wrote:VBRCloudTenant object has two properties: ServerCount and WorkStationCount. Those properties seem to be something you're looking for. Thanks.

Amazing.. How the *bleep* could I miss those two..

Thank you very much :)
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests