Get-SCCustomResource
Get-SCCustomResource
Gets a custom resource from the VMM library.
Syntax
Parameter Set: All
Get-SCCustomResource [-All] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: EquivalentResourceParamSet
Get-SCCustomResource -FamilyName <String> [-Release <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: ID
Get-SCCustomResource [-ID <Guid]> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: NameParamSet
Get-SCCustomResource -Name <String> [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Detailed Description
The Get-SCCustomResource cmdlet gets a custom resource from the VMM library. A custom resource is a folder-based library object in Virtual Machine Manager (VMM). The resource is declared at the folder level, and the contents of the folder is 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.
Parameters
-All
Indicates that this cmdlet retrieves a full list of all subordinate objects independent of the parent object. For example, the command Get-SCVirtualDiskDrive -All
retrieves all virtual disk drive objects regardless of the virtual machine object or template object that each virtual disk drive object is associated with.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-FamilyName<String>
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.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ID<Guid]>
Specifies the numerical identifier as a globally unique identifier (GUID) for a specific object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the name of a VMM object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Release<String>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- CustomResource
Examples
Example Example 1: Get a specific custom resource.
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.
PS C:\> $CR = Get-SCCustomResource -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -eq "Folder.CR" -and $_.LibraryServer.Name -eq "LibraryServer01.Contoso.com" }