New-SCStorageFileShare
Membuat berbagi file penyimpanan di VMM.
Sintaks
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>]
Deskripsi
Cmdlet New-SCStorageFileShare membuat berbagi file penyimpanan di Virtual Machine Manager (VMM).
Contoh
Contoh 1: Membuat berbagi file penyimpanan
PS C:\> $FileServer = Get-SCStorageFileServer -Name "FileServer01.Contoso.com"
PS C:\> New-SCStorageFileShare -Name "FileShare02" -StorageFileServer $FileServer -LocalPath "C:\FileShare02"
Perintah pertama mendapatkan objek server file penyimpanan bernama FileServer01 dan menyimpan objek dalam variabel $FileServer.
Perintah kedua membuat berbagi file penyimpanan bernama FileShare02 di FileServer01.
Contoh 2: Membuat berbagi file penyimpanan berjenjang di SOFS bersama
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
Perintah pertama mendapatkan objek server file penyimpanan bernama FileServer01, lalu menyimpannya dalam variabel $FileServer.
Perintah kedua mendapatkan kumpulan penyimpanan bernama Pool01, lalu menyimpannya dalam variabel $StoragePool.
Perintah ketiga dan keempat membuat tingkat penyimpanan.
Perintah kelima mendapatkan klasifikasi penyimpanan bernama Gold, lalu menyimpannya dalam variabel $StorageClassification.
Perintah terakhir membuat berbagi file berjenjang bernama FileShare01. Perintah menggunakan nilai yang dibuat dalam perintah sebelumnya.
Contoh 3: Membuat berbagi file penyimpanan berjenjang pada sistem 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"
Perintah pertama mendapatkan objek server file penyimpanan bernama FileServer01, lalu menyimpannya dalam variabel $FileServer.
Perintah kedua mendapatkan kumpulan penyimpanan bernama S2DPool01, lalu menyimpannya dalam variabel $StoragePool. Ini adalah kumpulan langsung ruang penyimpanan.
Perintah ketiga dan keempat membuat tingkat penyimpanan.
Perintah kelima mendapatkan klasifikasi penyimpanan bernama Gold, lalu menyimpannya dalam variabel $StorageClassification.
Perintah terakhir membuat berbagi file berjenjang bernama FileShare01. Perintah menggunakan nilai yang dibuat dalam perintah sebelumnya.
Parameter
-AllocationUnitSizeKB
Menentukan ukuran alokasi volume, dalam kilobyte.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContinuouslyAvailable
Menunjukkan apakah berbagi file tersedia secara berkelanjutan.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DedupMode
Terapkan deduplikasi pada volume atau berbagi file berdasarkan beban kerja. Nilai yang dapat diterima untuk parameter ini adalah:
- 0 - Dinonaktifkan
- 1 - GeneralPurpose
- 2 - Hyper-V
- 3 - Pencadangan
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
Menentukan deskripsi untuk berbagi file penyimpanan.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FileSystem
Menentukan sistem file volume penyimpanan. Nilai yang dapat diterima untuk parameter ini adalah:
- 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
Menentukan kumpulan penyimpanan yang dihosting.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobGroup
Menentukan pengidentifikasi untuk serangkaian perintah yang akan berjalan sebagai set tepat sebelum perintah akhir yang menyertakan pengidentifikasi grup pekerjaan yang sama berjalan.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
Menentukan bahwa kemajuan pekerjaan dilacak dan disimpan dalam variabel yang dinamai oleh parameter ini.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LocalPath
Menentukan jalur lokal untuk berbagi file penyimpanan.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MediaType
Menentukan array penyimpanan objek jenis media disk fisik.
Type: | StoragePhysicalDiskMediaType[] |
Accepted values: | Unknown, HDD, SSD |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Menentukan nama objek VMM.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NumberOfColumns
Menentukan jumlah kolom untuk disk virtual.
Type: | UInt16 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PhysicalDiskRedundancy
Menentukan jumlah kegagalan disk fisik yang dapat dipertahankan disk virtual.
Type: | UInt16 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
Menentukan ID tip Performa dan Pengoptimalan Sumber Daya (pro tip) yang memicu tindakan ini. Parameter ini memungkinkan Anda mengaudit tips 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
Menentukan pengaturan ketahanan untuk disk virtual. Nilai yang dapat diterima untuk parameter ini adalah:
- Sederhana
- Cermin
- Paritas
Type: | String |
Accepted values: | Simple, Mirror, Parity |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
Menunjukkan bahwa pekerjaan berjalan secara asinkron sehingga kontrol segera kembali ke shell perintah.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SizeMB
Menentukan ukuran, dalam megabyte, dari berbagi file penyimpanan.
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageClassification
Menentukan objek klasifikasi penyimpanan.
Type: | StorageClassification |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageFileServer
Menentukan objek server file penyimpanan.
Type: | StorageFileServer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StoragePool
Menentukan objek kumpulan penyimpanan.
Type: | StoragePool |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageTierSizeMB
Menentukan, dalam MB, ukuran tingkat penyimpanan.
Type: | UInt64[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageVolume
Menentukan objek volume penyimpanan pada host komputer virtual tertentu.
Type: | StorageVolume |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
Menentukan objek server VMM.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |