Edit

Share via


New-StorageFileServer

Creates a storage file server.

Syntax

ByFriendlyName (Default)

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

ByUniqueId

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

ByName

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

InputObject (cdxml)

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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HostNames

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

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

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

Parameter properties

Type:

CimInstance[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputObject (cdxml)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Protocols

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

Parameter properties

Type:

FileSharingProtocol[]

Default value:None
Accepted values:NFS, SMB
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StorageSubSystemFriendlyName

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

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFriendlyName
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-StorageSubSystemName

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

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-StorageSubSystemUniqueId

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

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:StorageSubSystemId

Parameter sets

ByUniqueId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

CimInstance

Notes

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