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 提示的標識碼) 。 此參數可讓您稽核 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 物件。