Register-SCStorageFileShare
Register-SCStorageFileShare
Registers a storage file share with a VM host, cluster, or library server.
Syntax
Parameter Set: RegisterToHost
Register-SCStorageFileShare -FileSharePath <String> -VMHost <Host> [-JobGroup <Guid> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]
Parameter Set: RegisterShareToCluster
Register-SCStorageFileShare -StorageFileShare <StorageFileShare> -VMHostCluster <HostCluster> [-JobGroup <Guid> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]
Parameter Set: RegisterShareToHost
Register-SCStorageFileShare -StorageFileShare <StorageFileShare> -VMHost <Host> [-JobGroup <Guid> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]
Parameter Set: RegisterShareToLibrary
Register-SCStorageFileShare -LibraryServer <LibraryServer> -StorageFileShare <StorageFileShare> [-JobGroup <Guid> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]
Parameter Set: RegisterToCluster
Register-SCStorageFileShare -FileSharePath <String> -VMHostCluster <HostCluster> [-JobGroup <Guid> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]
Parameter Set: RegisterToLibrary
Register-SCStorageFileShare -FileSharePath <String> -LibraryServer <LibraryServer> [-JobGroup <Guid> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]
Detailed Description
The Register-SCStorageFileShare cmdlet registers a storage file share with a virtual machine host, cluster, or library server.
Parameters
-FileSharePath<String>
Specifies the path to the file share.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-JobGroup<Guid>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-LibraryServer<LibraryServer>
Specifies a VMM library server object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PROTipID<Guid>
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
Aliases |
none |
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-StorageFileShare<StorageFileShare>
Specifies a storage file share.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VMHost<Host>
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, type: "Get-Help Add-SCVMHost -detailed". See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VMHostCluster<HostCluster>
Specifies a VMM host cluster object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
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.
- StorageFileShare
Examples
1: Register a storage file share with a library server.
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.
PS C:\> $FileShare = Get-SCStorageFileShare -Name "FileShare01"
PS C:\> $LibServer = Get-SCLibraryServer -Computername "LibraryServer01.Contoso.com"
PS C:\> Register-SCStorageFileShare -StorageFileShare $FileShare -LibraryServer $LibServer