다음을 통해 공유


Import-SCLibraryPhysicalResource

Imports a resource into the VMM library.

Syntax

Default (Default)

Import-SCLibraryPhysicalResource
    [-SourcePath] <String>
    [[-SharePath] <String>]
    [-OverwriteExistingFiles]
    [-AllowUnencryptedTransfer]
    [-VMMServer <ServerConnection>]
    [<CommonParameters>]

Description

The Import-SCLibraryPhysicalResource cmdlet imports a resource into the Virtual Machine Manager (VMM) library. Self-service users can only import resources into their designated user role data path or a folder under that path.

Examples

Example 1: Import a library resource by an administrator or delegated administrator

PS C:\> Import-SCLibraryPhysicalResource -SourcePath "C:\AdminFolder\VHD01.vhd" -SharePath "\\VMMLibraryServer\MSSCVMMLibrary\ImportedLibraryResources" -OverwriteExistingFiles

This command imports the virtual hard disk named VHD01.vhd stored in the folder named C:\AdminFolder into the specified library path. If a resource with that name already exists in that library path, this command will overwrite those files.

Example 2: Import a library resource by a self-service user by specifing a path under the default user role data path in the VMM library

PS C:\> Import-SCLibraryPhysicalResource -SourcePath "C:\SSFolder\VHD01.vhd" -SharePath "\\<DefaultUserRoleDataPath>\SSUserSubfolder\Folder01"

This command imports the virtual hard disk named VHD01 from the folder named C:\SSFolder to the SSUserSubFolder\Folder01 folder stored under the default user role data path for the self-service user role of which the logged on user is a member.

Example 3: Import a library resource by a self-service user to the default user role data path in the VMM library

PS C:\> Import-SCLibraryPhysicalResource -SourcePath "C:\SSFolder\VHD01.vhd"

This command imports the file named VHD01.vhd stored in C:\SSFolder to the default user role data path for the self-service user role of which the logged on user is a member.

Parameters

-AllowUnencryptedTransfer

Indicates that network file transfers do not require encryption. If you allow unencrypted network file transfers, it can improve performance if neither the source host nor the destination host requires encryption.

Use this parameter to:

  • Allow unencrypted file transfers into, or out of, the library.
  • Allow unencrypted file transfers into, out of, or within a host group.

Parameter properties

Type:SwitchParameter
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

-OverwriteExistingFiles

Indicates that files with the same name are overwritten when importing or exporting resources into or out of the VMM library.

Parameter properties

Type:SwitchParameter
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

-SharePath

Specifies a path to a valid library share on an existing library server that uses a Universal Naming Convention (UNC) path.

Example format: -SharePath "\\LibServer01\LibShare"

Parameter properties

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

Parameter sets

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

-SourcePath

Specifies the path to the resource that will be imported.

Parameter properties

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

Parameter sets

(All)
Position:0
Mandatory:True
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.