Set-SCStorageFileServer
从 VMM 管理添加或删除存储文件共享。
语法
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>]
说明
注意
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变量中。
最后一个命令在 VMM 管理下引入 FileShare01。
示例 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 提示) 的性能和资源优化提示的 ID。 此参数允许审核 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
指示作业异步运行,以便控件立即返回到命令 shell。
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 对象。