Categories: Uncategorized

VMware / MS VM / Real / Total Count

Garth writes some very useful SMS web reports so I copy them here sometimes:
http://smsug.ca/blogs/garth_jones/archive/2007/08/01/528.aspx

Declare @MS as int
Declare @VM as int
Declare @Real as int
Declare @Total as int
set @Total = (select count(*) from v_GS_COMPUTER_SYSTEM)
set @MS = (select count(*) from v_GS_COMPUTER_SYSTEM where Manufacturer0 = 'Microsoft Corporation' )
set @VM = (select count(*) from v_GS_COMPUTER_SYSTEM where Manufacturer0 = 'VMware, Inc.')
set @Real = (select @total - @MS - @VM)

Select
  @Real as 'Real PCs',
  @MS as 'MS Virtual PCs',
  @VM as 'VM Virtual PCs',
  @Total as 'Total'

TomLasswell

Share
Published by
TomLasswell

Recent Posts

Autotask: PowerShell: Enable Client Portal for all users

This is a quick one, it's been forever since I've posted here. After moving back…

2 years ago

PowerShell :: Get Exchange Mailboxes Over XXGB

Simple command turned crazy. I ended up coming up with this due to the fact…

3 years ago

PowerShell: ConnectWise Documents API, Uploading a document or attachment to a ticket

Phew, this one took a minute to figure out. ConnectWise has a form based documents…

5 years ago

PowerShell: ConnectWise REST API Query Contacts by Email Address

I've found myself at a new job, recreating many of the processes that I spent…

5 years ago

First post in a long time — changing hosting providers

Wow, it's been a while since I've done a real post on this site. I've…

6 years ago

Powershell: AutoTask – Get Picklist Values

When using AutoTask's API it's required to lookup a various amount of picklist values that…

9 years ago