Partilhar via


Get-SCDependentLibraryResource

Get-SCDependentLibraryResource

Identifies dependencies between VMM objects.

Syntax

Parameter Set: LibraryResource
Get-SCDependentLibraryResource [-LibraryResource] <LibObjectBase> [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: LibraryServer
Get-SCDependentLibraryResource [-LibraryServer] <LibraryServer> [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: LibraryShare
Get-SCDependentLibraryResource [-LibraryShare] <LibraryShare> [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed 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.

Parameters

-LibraryResource<LibObjectBase>

Specifies a resource stored in the VMM library.

Aliases

LibraryObject

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-LibraryServer<LibraryServer>

Specifies a VMM library server object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-LibraryShare<LibraryShare>

Specifies a VMM library share object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-OnBehalfOfUser<System.String>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>

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.

  • HardwareProfile
  • VirtualMachine
  • Template
  • GuestOSProfile

Examples

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

The first command gets the hard disk object named VHD01 on LibraryServer01 from the VMM library on VMMServer01, and then 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 modifies 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.

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

Get-SCISO

Get-SCLibraryServer

Get-SCLibraryShare

Get-SCVirtualHardDisk

Get-SCVirtualMachine

Get-SCVMTemplate