PowerShell script exchange
StigSornsen
Novice
Posts: 8 Liked: 1 time
Joined: Nov 17, 2016 2:39 pm
Full Name: Stig Sörnsen
Contact:
Post
by StigSornsen » Aug 09, 2017 7:42 am
this post
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:
Post
by StigSornsen » Aug 09, 2017 7:59 am
this post
Here is what I mean
And here is what my Powershell script gives me (HTML formatted):
How to get Workstation and Server count info from "Agent"?
veremin
Product Manager
Posts: 20735 Liked: 2402 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Post
by veremin » Aug 09, 2017 5:29 pm
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:
Post
by StigSornsen » Aug 10, 2017 6:29 pm
this post
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
Users browsing this forum: No registered users and 2 guests