Get-SCDependentLibraryResource

Identifies dependencies between VMM objects.

Syntax

Get-SCDependentLibraryResource
   [-VMMServer <ServerConnection>]
   [-LibraryResource] <LibObjectBase>
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Get-SCDependentLibraryResource
   [-VMMServer <ServerConnection>]
   [-LibraryShare] <LibraryShare>
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Get-SCDependentLibraryResource
   [-VMMServer <ServerConnection>]
   [-LibraryServer] <LibraryServer>
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]

Description

The Get-SCDependentLibraryResource cmdlet identifies dependencies between Virtual Machine Manager (VMM) objects.

You can use the Get-SCDependentLibraryResource cmdlet to identify objects that are dependent on the existence of:

  • The specified library object.

  • Any object on the specified library share.

  • Any object on the specified library server.

Examples

Example 1: Find all objects that depend on a particular virtual hard disk

PS C:\> $VHD = Get-SCVirtualHardDisk -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -eq "VHD01"  -and $_.LibraryServer.Name -eq "LibraryServer01.Contoso.com" }
PS C:\> Get-SCDependentLibraryResource -LibraryResource $VHD

The first command gets the hard disk object named VHD01 on LibraryServer01 from the VMM library on VMMServer01 and stores the object in the $VHD variable. This example assumes that only one virtual hard disk named VHD01 exists.

The second command returns all of the library objects that are dependent on VHD01.

If dependent objects exist, removing this virtual hard disk will modify those dependent objects so that they no longer reference the removed virtual hard disk. Thus, if VHD01 is associated with a specific virtual machine or with a specific template, that virtual machine or template is modified so that it no longer references VHD01 after it is removed.

Parameters

-LibraryResource

Specifies a resource stored in the VMM library.

Type:LibObjectBase
Aliases:LibraryObject
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-LibraryServer

Specifies a VMM library server object.

Type:LibraryServer
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-LibraryShare

Specifies a VMM library share object.

Type:LibraryShare
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-OnBehalfOfUser

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

Type:String
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

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

Outputs

HardwareProfile

This cmdlet returns a HardwareProfile object.