Udostępnij za pośrednictwem


Get-SCDependentLibraryResource

Identifies dependencies between VMM objects.

Syntax

LibraryResource (Default)

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

LibraryShare

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

LibraryServer

Get-SCDependentLibraryResource
    [-LibraryServer] <LibraryServer>
    [-VMMServer <ServerConnection>]
    [-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.

Parameter properties

Type:LibObjectBase
Default value:None
Supports wildcards:False
DontShow:False
Aliases:LibraryObject

Parameter sets

LibraryResource
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-LibraryServer

Specifies a VMM library server object.

Parameter properties

Type:LibraryServer
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

LibraryServer
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-LibraryShare

Specifies a VMM library share object.

Parameter properties

Type:LibraryShare
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

LibraryShare
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-OnBehalfOfUser

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:UserRole
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

HardwareProfile

This cmdlet returns a HardwareProfile object.