Set-SCStorageFileServer

Adds or removes a storage file share from VMM management.

Syntax

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

Description

Note

A new parameter [-DCBSettings] is included in VMM 2019 UR1. For more information, see Parameters.

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

-AddStorageFileShareToManagement

Enables management of the specified storage file share through VMM.

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

-CleanupDisks

{{Fill CleanupDisks Description}}

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

-DCBSettings

Specifies the DCB settings configured on the cluster.

Note

This parameter is applicable for VMM 2019 UR1.

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

-Description

Specifies a description for the storage file server.

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

-JobVariable

Specifies a variable in which job progress is tracked and stored.

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

-SkipClusterValidation

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageFileServer

Specifies a storage file server object.

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

Outputs

StorageFileServer

This cmdlet returns a StorageFileServer object.