New-AzRmStorageShare
建立記憶體檔案共用。
New-AzRmStorageShare
[-ResourceGroupName] <String>
[-StorageAccountName] <String>
-Name <String>
[-QuotaGiB <Int32>]
[-Metadata <Hashtable>]
[-AccessTier <String>]
[-Snapshot]
[-EnabledProtocol <String>]
[-RootSquash <String>]
[-ProvisionedBandwidthMibps <Int32>]
[-ProvisionedIops <Int32>]
[-PaidBurstingEnabled]
[-PaidBurstingMaxIops <Int32>]
[-PaidBurstingMaxBandwidthMibps <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzRmStorageShare
-StorageAccount <PSStorageAccount>
-Name <String>
[-QuotaGiB <Int32>]
[-Metadata <Hashtable>]
[-AccessTier <String>]
[-Snapshot]
[-EnabledProtocol <String>]
[-RootSquash <String>]
[-ProvisionedBandwidthMibps <Int32>]
[-ProvisionedIops <Int32>]
[-PaidBurstingEnabled]
[-PaidBurstingMaxIops <Int32>]
[-PaidBurstingMaxBandwidthMibps <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzRmStorageShare Cmdlet 會建立記憶體檔案共用。
New-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -QuotaGiB 100 -Metadata @{"tag1" = "value1"; "tag2" = "value2" }
ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount
Name QuotaGiB EnabledProtocol AccessTier Deleted Version ShareUsageBytes
---- -------- --------------- ---------- ------- ------- ---------------
myshare
此命令會建立記憶體檔案共用,其元數據和共用配額為 100 GiB。
Get-AzStorageAccount -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" | New-AzRmStorageShare -Name "myshare"
ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount
Name QuotaGiB EnabledProtocol AccessTier Deleted Version ShareUsageBytes
---- -------- --------------- ---------- ------- ------- ---------------
myshare
此命令會使用記憶體帳戶對象和共用名稱來建立記憶體檔案共用。
$share = New-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -AccessTier Hot
ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount
Name QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes
---- -------- ---------------- ---------- ------- ------- ---------------
myshare Hot
此命令會建立記憶體檔案共用,且存取層為經常性存取。
$shareSnapshot = New-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -Snapshot
ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount
Name QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes snapshotTime
---- -------- ---------------- ---------- ------- ------- --------------- ------------
myshare 2021-05-10T08:04:08
此命令會建立現有基底檔案共享的記憶體檔案共用快照集。
$share = New-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -EnabledProtocol NFS -RootSquash NoRootSquash
$share
ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount
Name QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes
---- -------- ---------------- ---------- ------- ------- ---------------
myshare NFS
$share.RootSquash
NoRootSquash
此命令會建立具有 EnabledProtocol proeprty 為 NFS 的記憶體檔案共用,並將 RootSquash proeprty 建立為 NoRootSquash。
New-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -ProvisionedBandwidthMibps 129 -ProvisionedIops 3032
此命令會建立具有布建頻寬和 IOPS 的記憶體檔案共用,它只適用於檔案布建 v2 帳戶類型。
New-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -PaidBurstingEnabled -PaidBurstingMaxBandwidthMibps 129 -PaidBurstingMaxIops 3032
此命令會建立具有付費高載頻寬和 IOPS 的記憶體檔案共用,它只適用於檔案布建 v1 帳戶類型。
特定共用的存取層。 StorageV2 帳戶可以選擇 TransactionOptimized (預設值)、經常性存取和非經常性存取。 FileStorage 帳戶可以選擇 [進階]。
類型: | String |
接受的值: | TransactionOptimized, Premium, Hot, Cool |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
設定檔案共享的通訊協定。 檔案共用建立之後無法變更。 可能的值包括:'SMB'、'NFS'
類型: | String |
接受的值: | NFS, SMB |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
共用元數據
類型: | Hashtable |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
Azure 檔案共享名稱
類型: | String |
別名: | N, ShareName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
指出是否為共用啟用付費高載。 此屬性僅適用於在 [檔案布建 v1 SSD] 帳戶類型下建立的檔案共用。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
共用的付費高載頻寬上限,每秒以 MB 為單位。 此屬性僅適用於在 [檔案布建 v1 SSD] 帳戶類型下建立的檔案共用。 允許的最大值是 10340,這是共用的最大允許頻寬。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
共用的付費高載 IOPS 上限。 此屬性僅適用於在 [檔案布建 v1 SSD] 帳戶類型下建立的檔案共用。 允許的最大值是 102400,這是共用允許的最大 IOPS。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
共用的布建頻寬,每秒以 MB 為單位。 此屬性僅適用於在 [檔案布建 v2] 帳戶類型下建立的檔案共用。 如需布建頻寬的最小和最大值,請參閱 Get-AzStorageFileServiceUsage Cmdlet 輸出。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
共用的已布建 IOPS。 此屬性僅適用於在 [檔案布建 v2] 帳戶類型下建立的檔案共用。 如需布建 IOPS 的最小值和最大值,請參閱 Get-AzStorageFileServiceUsage Cmdlet 輸出。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
在 Gibibyte 中共用配額。
類型: | Int32 |
別名: | Quota |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
資源組名。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
設定遠端超級使用者的訪問許可權縮減。 可能的值包括:'NoRootSquash'、'RootSquash'、'AllSquash'
類型: | String |
接受的值: | NoRootSquash, RootSquash, AllSquash |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
使用相同名稱建立現有共用的快照集。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
記憶體帳戶物件
類型: | PSStorageAccount |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
儲存體帳戶名稱。
類型: | String |
別名: | AccountName |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |