Register-SCStorageFileShare

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

Syntax

Register-SCStorageFileShare -FileSharePath <String> [-JobGroup <Guid>] [-JobVariable <String>]
 [-PROTipID <Guid>] [-RunAsynchronously] -VMHost <Host> [<CommonParameters>]
Register-SCStorageFileShare -FileSharePath <String> [-JobGroup <Guid>] [-JobVariable <String>]
 [-PROTipID <Guid>] [-RunAsynchronously] -VMHostCluster <HostCluster> [<CommonParameters>]
Register-SCStorageFileShare -FileSharePath <String> [-JobGroup <Guid>] [-JobVariable <String>]
 -LibraryServer <LibraryServer> [-PROTipID <Guid>] [-RunAsynchronously] [<CommonParameters>]
Register-SCStorageFileShare [-JobGroup <Guid>] [-JobVariable <String>] -LibraryServer <LibraryServer>
 [-PROTipID <Guid>] [-RunAsynchronously] -StorageFileShare <StorageFileShare> [<CommonParameters>]
Register-SCStorageFileShare [-JobGroup <Guid>] [-JobVariable <String>] [-PROTipID <Guid>] [-RunAsynchronously]
 -StorageFileShare <StorageFileShare> -VMHost <Host> [<CommonParameters>]
Register-SCStorageFileShare [-JobGroup <Guid>] [-JobVariable <String>] [-PROTipID <Guid>] [-RunAsynchronously]
 -StorageFileShare <StorageFileShare> -VMHostCluster <HostCluster> [<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.

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

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

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

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LibraryServer

Specifies a VMM library server object.

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

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

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

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageFileShare

Specifies a storage file share.

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

Type:Host
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMHostCluster

Specifies a VMM host cluster object.

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

Outputs

StorageFileShare

This cmdlet returns a **StorageFileShare** object.