New-StorageFileServer

Creates a storage file server.

Syntax

New-StorageFileServer
   [-StorageSubSystemFriendlyName] <String[]>
   -HostNames <String[]>
   -Protocols <FileSharingProtocol[]>
   [-FriendlyName <String>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]
New-StorageFileServer
   -StorageSubSystemUniqueId <String[]>
   -HostNames <String[]>
   -Protocols <FileSharingProtocol[]>
   [-FriendlyName <String>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]
New-StorageFileServer
   -StorageSubSystemName <String[]>
   -HostNames <String[]>
   -Protocols <FileSharingProtocol[]>
   [-FriendlyName <String>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]
New-StorageFileServer
   -InputObject <CimInstance[]>
   -HostNames <String[]>
   -Protocols <FileSharingProtocol[]>
   [-FriendlyName <String>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]

Description

The New-StorageFileServer cmdlet creates a file server for a specified Storage subsystem exposed by a Storage provider. For Windows network-attached storage (NAS), this cmdlet enables the necessary roles and features to implement a scale-out file server instance on a cluster.

Not all systems support file servers other than the default.

Examples

Example 1: Create a file server

PS C:\>New-StorageFileServer -FriendlyName "SalesFiles" -StorageSubSystemFriendlyName "Sales-cluster" -HostName "salesfiles" -Protocol SMB -ContinuouslyAvailabe $True

This command creates a scale-out file server on the sales-cluster subsystem.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

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

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Type:CimSession[]
Aliases:Session
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FriendlyName

Specifies a friendly name for the file server. A friendly name is not required to be unique.

Some Storage subsystems do not allow a friendly name when creating a file server. In this scenario, the file server may be assigned a friendly name by this operation.

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

-HostNames

Specifies an array of names of access points for the file server.

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

-InputObject

Specifies the input object that is used in a pipeline command.

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

-Protocols

Specifies the file sharing protocol. Valid values are: SMB, NFS, or both.

Type:FileSharingProtocol[]
Accepted values:NFS, SMB
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-StorageSubSystemFriendlyName

Specifies the friendly name of the Storage subsystem to host the file server.

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

-StorageSubSystemName

Specifies the name of the Storage subsystem to host the file server.

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

-StorageSubSystemUniqueId

Specifies the unique ID of the Storage subsystem to host the file server.

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

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

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

Outputs

CimInstance

Notes

  • When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all servers in the cluster).