Set-VMHostCluster
Configures a virtual machine host cluster.
语法
Parameter Set: CimSession
Set-VMHostCluster [-CimSession] <CimSession[]> [-Passthru] [-SharedStoragePath <String> ] [ <CommonParameters>]
Parameter Set: ClusterName
Set-VMHostCluster [-ClusterName] <String[]> [[-Credential] <PSCredential[]> ] [-Passthru] [-SharedStoragePath <String> ] [ <CommonParameters>]
Parameter Set: InputObject
Set-VMHostCluster [-InputObject] <VMHostCluster[]> [-Passthru] [-SharedStoragePath <String> ] [ <CommonParameters>]
详细说明
The Set-VMHostCluster cmdlet configures a virtual machine host cluster.
参数
-CimSession<CimSession[]>
在远程会话中或远程计算机上运行该 cmdlet。输入计算机名或会话对象,如 New-cimsession 或 Get-cimsession cmdlet 的输出。默认为本地计算机上的当前会话。
别名 |
none |
是否必需? |
true |
在哪里? |
1 |
默认值 |
none |
是否接受管道输入? |
true(ByValue) |
是否接受通配符? |
false |
-ClusterName<String[]>
Specifies an array of names of the virtual machine host clusters that this cmdlet configures.
别名 |
none |
是否必需? |
true |
在哪里? |
1 |
默认值 |
none |
是否接受管道输入? |
true(ByValue) |
是否接受通配符? |
false |
-Credential<PSCredential[]>
Specifies one or more user accounts that have permission to perform this action. The default is the current user.
别名 |
none |
是否必需? |
false |
在哪里? |
2 |
默认值 |
none |
是否接受管道输入? |
true(ByValue) |
是否接受通配符? |
false |
-InputObject<VMHostCluster[]>
Specifies an array of virtual machine host clusters that this cmdlet configures. To obtain a VMHostCluster object, use the Get-VMHostCluster cmdlet.
别名 |
none |
是否必需? |
true |
在哪里? |
1 |
默认值 |
none |
是否接受管道输入? |
true(ByValue) |
是否接受通配符? |
false |
-Passthru
Indicates that this cmdlet returns the Microsoft.HyperV.PowerShell.VMHostCluster object that it configures.
别名 |
none |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
false |
-SharedStoragePath<String>
Specifies the location of the shared storage for the virtual machine host cluster.
别名 |
none |
是否必需? |
false |
在哪里? |
named |
默认值 |
none |
是否接受管道输入? |
false |
是否接受通配符? |
false |
<CommonParameters>
此 cmdlet 支持常见的参数:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。有关详细信息,请参阅 TechNet 上的 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
输入
输入类型是可以传送到 cmdlet 的对象的类型。
输出
输出类型是 cmdlet 发出的对象的类型。
Microsoft.HyperV.PowerShell.VMHostCluster
This cmdlet returns a VMHostCluster object, if you specify the Passthru parameter.
示例
Example 1: Configure a virtual machine host cluster
This command configures the shared storage path for the cluster named ContosoCluster.
PS C:\> Set-VMHostCluster -ClusterName "ContosoCluster" -SharedStoragePath "D:\ClusterStorage\cluster01"