Get-SCCloudUsage

Gets cloud usage data for a specified private cloud in VMM.

Syntax

Get-SCCloudUsage -Cloud <Cloud> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-ReturnPerUserRole] [-VMMServer <ServerConnection>] [<CommonParameters>]
Get-SCCloudUsage -Cloud <Cloud> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-UserName <String>] -UserRole <UserRole> [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

The Get-SCCloudUsage cmdlet gets cloud usage data for a specified private cloud in Virtual Machine Manager (VMM). Cloud usage data includes the following:

- Number of CPUs

  • Custom quota points
  • Amount of memory (in MB)
  • Amount of storage (in GB)
  • Number of Virtual Machines

    You can scope this data to usage per user role and per user.

Examples

Example 1: Get the usage information for a specified private cloud

PS C:\> $Cloud = Get-SCCloud -Name "Cloud01"
PS C:\> Get-SCCloudUsage -Cloud $Cloud

The first command gets the private cloud object named Cloud01 and stores the object in the $Cloud variable.

The second command gets the cloud usage information for the private cloud stored in $Cloud and displays the following information to the user:

- CPUUsageCount

  • CustomQuotaUsageCount
  • MemoryUsageMB
  • StorageUsageGB
  • VMUsageCount

Example 2: Get the usage information for a specified private cloud for a specified user role

PS C:\> $Cloud = Get-SCCloud -Name "Cloud01"
PS C:\> $UserRole = Get-SCUserRole -Name "SelfServiceUsers"
PS C:\> Get-SCCloudUsage -Cloud $Cloud -UserRole $UserRole

The first command gets the private cloud object named Cloud01 and stores the object in the $Cloud variable.

The second command gets the user role object named SelfServiceUsers and stores the object in the $UserRole variable.

The last command gets the cloud usage information for the private cloud stored in $Cloud and the user role stored in $UserRole. Then, the command displays the cloud usage information to the user.

Example 3: Get the usage information for a specified private cloud for a specified user within a user role

PS C:\> $Cloud = Get-SCCloud -Name "Cloud01"
PS C:\> $UserRole = Get-SCUserRole -Name "SelfServiceUsers"
PS C:\> Get-SCCloudUsage -Cloud $Cloud -UserRole $UserRole -UserName "Contoso\PattiFuller"

The first command gets the private cloud object named Cloud01 and stores the object in the $Cloud variable.

The second command gets the user role object named SelfServiceUsers and stores the object in the $UserRole variable.

The last command gets the cloud usage information for the private cloud stored in $Cloud and the user named PattiFuller who is in the user role named SelfServiceUsers. Then, the command displays the cloud usage information to the user.

Parameters

-Cloud

Specifies a private cloud object.

Type:Cloud
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUserRole

Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.

Type:UserRole
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ReturnPerUserRole

Specifies a return per user role.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserName

Specifies a the name of a user. Enter a user name with the format Domain\User.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserRole

Specifies a user role object.

Type:UserRole
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False