Get-SCCustomResource

Gets a custom resource from the VMM library.

Syntax

Get-SCCustomResource [-All] [-VMMServer <ServerConnection>] [<CommonParameters>]
Get-SCCustomResource -FamilyName <String> [-Release <String>] [-VMMServer <ServerConnection>]
 [<CommonParameters>]
Get-SCCustomResource [-ID <Guid>] [-VMMServer <ServerConnection>] [<CommonParameters>]
Get-SCCustomResource -Name <String> [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

The Get-SCCustomResource cmdlet gets a custom resource from the Virtual Machine Manager (VMM) library. A custom resource is a folder-based library object in VMM. The resource is declared at the folder level, and the contents of the folder are unknown to VMM.

To add a custom resource to the library, create a folder with a .CR extension, place content in the folder, and then use the VMM console to drag the folder to a VMM library share. VMM discovers and imports the folder into the library as a custom resource.

Examples

Example 1: Get a specific custom resource

PS C:\> $CR = Get-SCCustomResource -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -eq "Folder.CR" -and $_.LibraryServer.Name -eq "LibraryServer01.Contoso.com" }

This command gets the custom resource object named Folder.CR on LibraryServer01 from the VMM library on VMMServer01 and then stores the object in the $CR variable.

Parameters

-All

Indicates that this cmdlet gets all subordinate objects independent of the parent object. For example, the command Get-SCVirtualDiskDrive -All gets all virtual disk drive objects regardless of the virtual machine object or template object that each virtual disk drive object is associated with.

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

Specifies a family name for a physical resource in the VMM library. This value is used in conjunction with Release, Namespace, and Type to establish equivalency among library resources.

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

Specifies the numerical identifier as a globally unique identifier, or GUID, for an object.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a VMM object.

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

Specifies a string that describes the release of a library resource. VMM automatically creates a release value for every resource imported into the library. After the resource has been imported, the string can be customized.

Type:String
Required:False
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

Outputs

CustomResource

This cmdlet returns a **CustomResource** object.