New-SCStorageFileShare

New-SCStorageFileShare

Creates a storage file share in VMM.

Syntax

Parameter Set: NewShareOnNASFromHostedPool
New-SCStorageFileShare -HostedStoragePool <String> -Name <String> -SizeMB <UInt64> -StorageFileServer <StorageFileServer> [-Description <String> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: NewShareOnNASFromPool
New-SCStorageFileShare -Name <String> -SizeMB <UInt64> -StorageFileServer <StorageFileServer> -StoragePool <StoragePool> [-Description <String> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: NewShareOnWindowsServer
New-SCStorageFileShare -LocalPath <String> -Name <String> -StorageFileServer <StorageFileServer> [-ContinuouslyAvailable <Boolean> ] [-Description <String> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed Description

The New-SCStorageFileShare cmdlet creates a storage file share in Virtual Machine Manager (VMM).

Parameters

-ContinuouslyAvailable<Boolean>

Indicates whether the file share is available on a continuous basis.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Description<String>

States a description for the specified object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-HostedStoragePool<String>

Specifies a hosted storage pool.

Aliases

none

Required?

true

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

-LocalPath<String>

Specifies a local path for a storage file share.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM 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

-SizeMB<UInt64>

Specifies the size, in megabytes, of a storage file share.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StorageFileServer<StorageFileServer>

Specifies a storage file server object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StoragePool<StoragePool>

Specifies a storage pool object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

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.

Examples

1: Create a storage file share.

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

The second command creates a storage file share named FileShare02 on FileServer01.

PS C:\> $FileServer = Get-SCStorageFileServer -Name "FileServer01.Contoso.com"
PS C:\> New-SCStorageFileShare -Name "FileShare02" -StorageFileServer $FileServer -LocalPath "C:\FileShare02"

Get-SCStorageFileShare

Register-SCStorageFileShare

Remove-SCStorageFileShare

Repair-SCStorageFileShare

Set-SCStorageFileShare

Unregister-SCStorageFileShare