New-SCStorageFileShare
在 VMM 中建立儲存體檔案共用。
Syntax
New-SCStorageFileShare
[-VMMServer <ServerConnection>]
-StorageFileServer <StorageFileServer>
-Name <String>
[-Description <String>]
-LocalPath <String>
[-ContinuouslyAvailable <Boolean>]
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCStorageFileShare
[-VMMServer <ServerConnection>]
-StorageFileServer <StorageFileServer>
-Name <String>
[-Description <String>]
-StoragePool <StoragePool>
[-FileSystem <String>]
[-DedupMode <DedupMode>]
[-AllocationUnitSizeKB <UInt32>]
[-StorageClassification <StorageClassification>]
[-ReadCacheSizeMB <UInt64>]
-JobGroup <Guid>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCStorageFileShare
[-VMMServer <ServerConnection>]
-StorageFileServer <StorageFileServer>
-Name <String>
[-Description <String>]
-StoragePool <StoragePool>
[-FileSystem <String>]
[-ResiliencySettingName <String>]
[-NumberOfColumns <UInt16>]
[-PhysicalDiskRedundancy <UInt16>]
[-DedupMode <DedupMode>]
[-AllocationUnitSizeKB <UInt32>]
-SizeMB <UInt64>
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCStorageFileShare
[-VMMServer <ServerConnection>]
-StorageFileServer <StorageFileServer>
-Name <String>
[-Description <String>]
-StoragePool <StoragePool>
[-FileSystem <String>]
[-ResiliencySettingName <String>]
[-NumberOfColumns <UInt16>]
[-PhysicalDiskRedundancy <UInt16>]
[-DedupMode <DedupMode>]
[-AllocationUnitSizeKB <UInt32>]
[-StorageClassification <StorageClassification>]
-MediaType <StoragePhysicalDiskMediaType[]>
-StorageTierSizeMB <UInt64[]>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCStorageFileShare
[-VMMServer <ServerConnection>]
-StorageFileServer <StorageFileServer>
-Name <String>
[-Description <String>]
-StorageVolume <StorageVolume>
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCStorageFileShare
[-VMMServer <ServerConnection>]
-StorageFileServer <StorageFileServer>
-Name <String>
[-Description <String>]
-HostedStoragePool <String>
-SizeMB <UInt64>
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Description
New-SCStorageFileShare Cmdlet 會在 Virtual Machine Manager (VMM) 中建立儲存體檔案共用。
範例
範例 1:建立儲存體檔案共用
PS C:\> $FileServer = Get-SCStorageFileServer -Name "FileServer01.Contoso.com"
PS C:\> New-SCStorageFileShare -Name "FileShare02" -StorageFileServer $FileServer -LocalPath "C:\FileShare02"
第一個命令會取得名為 FileServer01 的儲存體檔案伺服器物件,並將物件儲存在$FileServer變數中。
第二個命令會在 FileServer01 上建立名為 FileShare02 的儲存體檔案共用。
範例 2:在共用 SOFS 上建立階層式儲存體檔案共用
PS C:\> $FileServer = Get-SCStorageFileServer -Name "FileServer01.Contoso.com"
PS C:\> $StoragePool = Get-SCStoragePool -Name "Pool01"
PS C:\> New-SCStorageTier -MediaType "SSD" -SizeMB 1024 -PhysicalDiskRedundancy "2" -ResiliencySettingName "Mirror" -RunAsynchronously -JobGroup "2e42beba-fb19-4c15-94e6-64a54012dce3"
PS C:\> New-SCStorageTier -MediaType "HDD" -SizeMB 1024 -PhysicalDiskRedundancy "2" -ResiliencySettingName "Parity" -RunAsynchronously -JobGroup "2e42beba-fb19-4c15-94e6-64a54012dce3"
PS C:\> $StorageClassification = Get-SCStorageClassification -Name "Gold"
PS C:\> $StorageFileShare = New-SCStorageFileShare -StorageFileServer $FileServer -StoragePool $StoragePool -Name "FileShare01" -Description "shared SOSF" -RunAsynchronously -JobGroup "2e42beba-fb19-4c15-94e664a54012dce3" -FileSystem "CSVFS_ReFS" -StorageClassification $StorageClassification
第一個命令會取得名為 FileServer01 的儲存體檔案伺服器物件,然後將它儲存在 $FileServer 變數中。
第二個命令會取得名為 Pool01 的存放集區,然後將它儲存在$StoragePool變數中。
第三和第四個命令會建立儲存層。
第五個命令會取得名為 Gold 的儲存體分類,然後將它儲存在$StorageClassification變數中。
最後一個命令會建立名為 FileShare01 的階層式檔案共用。 此命令會使用在先前命令中建立的值。
範例 3:在 S2D 系統上建立階層式儲存體檔案共用
PS C:\> $FileServer = Get-SCStorageFileServer -Name "FileServer01.Contoso.com"
PS C:\> $StoragePool = Get-SCStoragePool -Name "S2DPool01"
PS C:\> New-SCStorageTier -StorageTierFriendlyName "Performance" -StorageTierSizeInMB 1024 -RunAsynchronously -JobGroup "2e42beba-fb19-4c15-94e6-64a54012dce3"
PS C:\> New-SCStorageTier -StorageTierFriendlyName "Capacity" -StorageTierSizeInMB 1024 -RunAsynchronously -JobGroup "2e42beba-fb19-4c15-94e6-64a54012dce3"
PS C:\> $StorageClassification = Get-SCStorageClassification -Name "Gold"
PS C:\> $StorageFileShare = New-SCStorageFileShare -StorageFileServer $FileServer -StoragePool $StoragePool -Name "FileShare01" -Description "storage spaces direct config" -RunAsynchronously -JobGroup "2e42beba-fb19-4c15-94e664a54012dce3" -FileSystem "CSVFS_ReFS" -StorageClassification $StorageClassification"
第一個命令會取得名為 FileServer01 的儲存體檔案伺服器物件,然後將它儲存在 $FileServer 變數中。
第二個命令會取得名為 S2DPool01 的存放集區,然後將它儲存在$StoragePool變數中。 這是儲存空間直接存取集區。
第三和第四個命令會建立儲存層。
第五個命令會取得名為 Gold 的儲存體分類,然後將它儲存在$StorageClassification變數中。
最後一個命令會建立名為 FileShare01 的階層式檔案共用。 此命令會使用在先前命令中建立的值。
參數
-AllocationUnitSizeKB
指定磁片區的配置大小,以 KB 為單位。
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContinuouslyAvailable
指出是否持續提供檔案共用。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DedupMode
根據工作負載,對磁片區或檔案共用套用重復資料刪除。 此參數可接受的值為:
- 0 - 已停用
- 1 - GeneralPurpose
- 2 - Hyper-V
- 3 - 備份
Type: | DedupMode |
Accepted values: | Disabled, GeneralPurpose, HyperV, Backup, NotAvailable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
指定儲存體檔案共用的描述。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FileSystem
指定儲存體磁片區的檔案系統。 此參數可接受的值為:
- CSVFS_NTFS
- CSVFS_ReFS
Type: | String |
Accepted values: | CSVFS_NTFS, CSVFS_ReFS |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HostedStoragePool
指定裝載的存放集區。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobGroup
指定一系列命令的識別碼,這些命令會在執行包含相同工作群組識別碼的最終命令之前,使用整組的方式來執行。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定追蹤工作進度,並將工作進度存放在這個參數命名的變數中。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LocalPath
指定儲存體檔案共用的本機路徑。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MediaType
指定儲存體實體磁片媒體類型物件的陣列。
Type: | StoragePhysicalDiskMediaType[] |
Accepted values: | Unknown, HDD, SSD |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
指定 VMM 物件的名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NumberOfColumns
指定虛擬磁片的資料行數目。
Type: | UInt16 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PhysicalDiskRedundancy
指定虛擬磁片可承受的實體磁片失敗數目。
Type: | UInt16 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定觸發此動作之 PRO 提示 (PRO 提示的識別碼) 。 此參數可讓您稽核 PRO 秘訣。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReadCacheSizeMB
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResiliencySettingName
指定虛擬磁片的復原設定。 此參數可接受的值為:
- 簡單
- 鏡像
- Parity
Type: | String |
Accepted values: | Simple, Mirror, Parity |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
表示作業會以非同步方式執行,讓控制項立即返回命令殼層。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SizeMB
指定儲存體檔案共用的大小,以 MB 為單位。
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageClassification
指定儲存體分類物件。
Type: | StorageClassification |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageFileServer
指定儲存體檔案伺服器物件。
Type: | StorageFileServer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StoragePool
指定存放集區物件。
Type: | StoragePool |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageTierSizeMB
指定以 MB 為單位的儲存層大小。
Type: | UInt64[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageVolume
指定特定虛擬機器主機上的儲存磁片區物件。
Type: | StorageVolume |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
指定 VMM 伺服器物件。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |