Set-SCStorageFileServer

Adds or removes a storage file share from VMM management.

Syntax

Set-SCStorageFileServer [-StorageFileServer] <StorageFileServer> [-AddDiskWitnessFromStoragePool <StoragePool>]
 [-Description <String>] [-JobGroup <Guid>] [-JobVariable <String>] [-PROTipID <Guid>]
 [-RemoveStorageFileShareFromManagement <StorageFileShare[]>] [-RunAsynchronously] [<CommonParameters>]
Set-SCStorageFileServer [-StorageFileServer] <StorageFileServer> -AddExistingComputer <String[]>
 [-Description <String>] [-JobGroup <Guid>] [-JobVariable <String>] [-PROTipID <Guid>] [-RunAsynchronously]
 [-SkipClusterValidation] [<CommonParameters>]
Set-SCStorageFileServer [-StorageFileServer] <StorageFileServer>
 -AddStorageFileShareToManagement <StorageFileShare[]> [-Description <String>] [-JobGroup <Guid>]
 [-JobVariable <String>] [-PROTipID <Guid>] [-RemoveStorageFileShareFromManagement <StorageFileShare[]>]
 [-RunAsynchronously] [-StorageClassificationAssociation <StorageClassification[]>] [<CommonParameters>]
Set-SCStorageFileServer [-StorageFileServer] <StorageFileServer> [-Description <String>] [-JobGroup <Guid>]
 [-JobVariable <String>] [-PROTipID <Guid>] -RemoveExistingComputer <StorageFileServerNode[]>
 [-RunAsynchronously] [<CommonParameters>]
Set-SCStorageFileServer [-StorageFileServer] <StorageFileServer> [-Description <String>] [-JobGroup <Guid>]
 [-JobVariable <String>] [-PROTipID <Guid>] [-RunAsynchronously] [<CommonParameters>]

Description

The Set-SCStorageFileServer cmdlet adds or removes a storage file share from Virtual Machine Manager (VMM) management.

Examples

Example 1: Add a storage file share to VMM management

PS C:\> $FileServer = Get-SCStorageFileServer -Name "FileServer01.Contoso.com"
PS C:\> $FileShare = Get-SCStorageFileShare -Name "FileShare01" 
PS C:\> Set-SCStorageFileServer -StorageFileServer $FileServer -AddStorageFileShareToManagement $FileShare

The first command gets the storage file server object named FileServer01 by using the Get-SCStorageFileServer cmdlet. The command stores that object in the $FileServer variable.

The second command gets the storage file share object named FileShare01 by using the Get-SCStorageFileShare cmdlet. The command stores that object in the $FileShare variable.

The last command brings FileShare01 under VMM management.

Example 2: Remove a storage file share from VMM management

PS C:\> $FileServer = Get-SCStorageFileServer -Name "FileServer01.Contoso.com"
PS C:\> $FileShare = Get-SCStorageFileShare -Name "FileShare01" 
PS C:\> Set-SCStorageFileServer -StorageFileServer $FileServer -RemoveStorageFileShareFromManagement $FileShare

The first command gets the storage file server object named FileServer01, and then stores that object in the $FileServer variable.

The second command gets the storage file share object named FileShare01, and then stores that object in the $FileShare variable.

The last command removes FileShare01 from VMM management.

Parameters

-AddDiskWitnessFromStoragePool

Specifies a storage pool object.

Type:StoragePool
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AddExistingComputer

Specifies an array of computers that this cmdlet adds. Specify the fully qualified domain names (FQDN), NetBIOS names, or IP addresses of servers on the network that have an operating system.

Type:String[]
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AddStorageFileShareToManagement

Enables management of the specified storage file share through VMM.

Type:StorageFileShare[]
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the storage file server.

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

Specifies an identifier for a series of commands that 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 a variable in which job progress is tracked and stored.

Type:String
Required:False
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
-RemoveExistingComputer

Specifies an array of computers that this cmdlet removes. Specify FQDNs, NetBios names, or IP addresses of servers on the network that have an operating system.

Type:StorageFileServerNode[]
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveStorageFileShareFromManagement

Specifies an array of storage file shares that this cmdlet removes from VMM management.

Type:StorageFileShare[]
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
-SkipClusterValidation

Indicates that this cmdlet skips cluster validation tests when it creates a cluster.

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

Specifies an array of storage classification objects that is associated with a storage pool.

Type:StorageClassification[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageFileServer

Specifies a storage file server object.

Type:StorageFileServer
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

StorageFileServer

This cmdlet returns a **StorageFileServer** object.