Set-SCStorageFileServer
從 VMM 管理新增或移除儲存體檔案共用。
Syntax
Set-SCStorageFileServer
-StorageFileServer <StorageFileServer>
[-JobGroup <Guid>]
[-Description <String>]
[-RemoveStorageFileShareFromManagement <StorageFileShare[]>]
[-AddDiskWitnessFromStoragePool <StoragePool>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Set-SCStorageFileServer
-AddExistingComputer <String[]>
-StorageFileServer <StorageFileServer>
[-JobGroup <Guid>]
[-Description <String>]
[-SkipClusterValidation]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Set-SCStorageFileServer
-RemoveExistingComputer <StorageFileServerNode[]>
-StorageFileServer <StorageFileServer>
[-JobGroup <Guid>]
[-CleanupDisks]
[-Description <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Set-SCStorageFileServer
-StorageFileServer <StorageFileServer>
[-JobGroup <Guid>]
[-Description <String>]
-AddStorageFileShareToManagement <StorageFileShare[]>
[-StorageClassificationAssociation <StorageClassification[]>]
[-RemoveStorageFileShareFromManagement <StorageFileShare[]>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Set-SCStorageFileServer
-StorageFileServer <StorageFileServer>
[-JobGroup <Guid>]
[-Description <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Description
注意
VMM 2019 UR1 中包含新的參數 [-DCBSettings ]。 如需詳細資訊,請參閱參數。
Set-SCStorageFileServer Cmdlet 會從 Virtual Machine Manager (VMM) 管理新增或移除儲存體檔案共用。
範例
範例 1:將儲存體檔案共用新增至 VMM 管理
PS C:\> $FileServer = Get-SCStorageFileServer -Name "FileServer01.Contoso.com"
PS C:\> $FileShare = Get-SCStorageFileShare -Name "FileShare01"
PS C:\> Set-SCStorageFileServer -StorageFileServer $FileServer -AddStorageFileShareToManagement $FileShare
第一個命令會使用 Get-SCStorageFileServer Cmdlet 取得名為 FileServer01 的儲存體檔案伺服器物件。 命令會將該物件儲存在 $FileServer 變數中。
第二個命令會使用 Get-SCStorageFileShare Cmdlet 來取得名為 FileShare01 的儲存體檔案共用物件。 命令會將該物件儲存在$FileShare變數中。
最後一個命令會將 FileShare01 帶入 VMM 管理之下。
範例 2:從 VMM 管理中移除儲存體檔案共用
PS C:\> $FileServer = Get-SCStorageFileServer -Name "FileServer01.Contoso.com"
PS C:\> $FileShare = Get-SCStorageFileShare -Name "FileShare01"
PS C:\> Set-SCStorageFileServer -StorageFileServer $FileServer -RemoveStorageFileShareFromManagement $FileShare
第一個命令會取得名為 FileServer01 的儲存體檔案伺服器物件,然後將該物件儲存在$FileServer變數中。
第二個命令會取得名為 FileShare01 的儲存體檔案共用物件,然後將該物件儲存在$FileShare變數中。
最後一個命令會從 VMM 管理中移除 FileShare01。
參數
-AddDiskWitnessFromStoragePool
指定存放集區物件。
Type: | StoragePool |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AddExistingComputer
指定這個 Cmdlet 所新增的電腦陣列。 指定具有作業系統之網路上伺服器的完整功能變數名稱 (FQDN) 、NetBIOS 名稱或 IP 位址。
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AddStorageFileShareToManagement
允許透過 VMM 管理指定的儲存體檔案共用。
Type: | StorageFileShare[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CleanupDisks
{{Fill CleanupDisks Description}}
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DCBSettings
指定叢集上設定的 DCB 設定。
注意
此參數適用于 VMM 2019 UR1。
Type: | DCBSettings |
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 |
-JobGroup
指定一系列命令的識別碼,這些命令會在包含相同作業群組識別碼的執行的最後一個命令之前,以集合的形式執行。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
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 |
-PROTipID
指定觸發此動作 (PRO 提示) 效能和資源優化提示的識別碼。 此參數可讓您稽核 PRO 秘訣。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveExistingComputer
指定此 Cmdlet 移除的電腦陣列。 指定具有作業系統之網路上伺服器的 FQDN、NetBios 名稱或 IP 位址。
Type: | StorageFileServerNode[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveStorageFileShareFromManagement
指定此 Cmdlet 從 VMM 管理中移除的儲存體檔案共用陣列。
Type: | StorageFileShare[] |
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 |
-SkipClusterValidation
指出此 Cmdlet 會在建立叢集時略過叢集驗證測試。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageClassificationAssociation
指定與存放集區相關聯的儲存分類物件陣列。
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: | True |
Accept wildcard characters: | False |
輸出
StorageFileServer
此 Cmdlet 會傳回 StorageFileServer 物件。