次の方法で共有


Register-SCStorageFileShare

Registers a storage file share with a VM host, cluster, or library server.

Syntax

RegisterToHost (Default)

Register-SCStorageFileShare
    -VMHost <Host>
    -FileSharePath <String>
    [-JobGroup <Guid>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

RegisterShareToHost

Register-SCStorageFileShare
    -VMHost <Host>
    -StorageFileShare <StorageFileShare>
    [-JobGroup <Guid>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

RegisterToCluster

Register-SCStorageFileShare
    -VMHostCluster <HostCluster>
    -FileSharePath <String>
    [-JobGroup <Guid>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

RegisterShareToCluster

Register-SCStorageFileShare
    -VMHostCluster <HostCluster>
    -StorageFileShare <StorageFileShare>
    [-JobGroup <Guid>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

RegisterShareToLibrary

Register-SCStorageFileShare
    -LibraryServer <LibraryServer>
    -StorageFileShare <StorageFileShare>
    [-JobGroup <Guid>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

RegisterToLibrary

Register-SCStorageFileShare
    -LibraryServer <LibraryServer>
    -FileSharePath <String>
    [-JobGroup <Guid>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

The Register-SCStorageFileShare cmdlet registers a storage file share with a virtual machine host, cluster, or library server.

Examples

Example 1: Register a storage file share with a library server

PS C:\> $FileShare = Get-SCStorageFileShare -Name "FileShare01"
PS C:\> $LibServer = Get-SCLibraryServer -ComputerName "LibraryServer01.Contoso.com"
PS C:\> Register-SCStorageFileShare -StorageFileShare $FileShare -LibraryServer $LibServer

The first command gets the storage file share object named FileShare01 and stores the object in the $FileShare variable.

The second command gets the VMM library server object named LibraryServer01 and stores the object in the $LibServer variable.

The last command registers FileShare01 with LibraryServer01.

Parameters

-FileSharePath

Specifies the path to the file share.

Parameter properties

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

Parameter sets

RegisterToHost
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RegisterToCluster
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RegisterToLibrary
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobGroup

Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.

Parameter properties

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

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

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

-LibraryServer

Specifies a VMM library server object.

Parameter properties

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

Parameter sets

RegisterShareToLibrary
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RegisterToLibrary
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Parameter properties

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

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

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

-StorageFileShare

Specifies a storage file share.

Parameter properties

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

Parameter sets

RegisterShareToHost
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RegisterShareToCluster
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RegisterShareToLibrary
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMHost

Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.

For more information about each type of host, see the Add-SCVMHost cmdlet.

Parameter properties

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

Parameter sets

RegisterToHost
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RegisterShareToHost
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMHostCluster

Specifies a VMM host cluster object.

Parameter properties

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

Parameter sets

RegisterToCluster
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RegisterShareToCluster
Position:Named
Mandatory:True
Value from pipeline:False
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

StorageFileShare

This cmdlet returns a StorageFileShare object.