我只想一次启动 5 个集群资源 [英] I would like to start the cluster resources 5 at a time only

查看:34
本文介绍了我只想一次启动 5 个集群资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个带有 2012 R2 的 4 个 Hyper-V 集群,并且虚拟机正在其上运行.

We had a 4 Hyper-V clusters with 2012 R2 and VM's are running on it.

我只想一次启动 5 个集群资源,我曾尝试按照 MS 执行以下命令,但没有按预期工作.

I would like to start the cluster resources 5 at a time only and i had tried following command as per MS but it is not working as expected.

它不是 5 Vm,而是启动所有 VM 的任何帮助

instead of 5 Vm it is starting all VM's any help appreciated

Get-Cluster -name cluster1 | Get-ClusterResource | where { $_.Name -and $_.state -eq "offline"} –ob 5 | Start-ClusterResource 

推荐答案

我没有一个 HyperV 集群来测试这个,但是 Select-Object -First 5 将只选择 5 个返回的集群资源:

I've not got a HyperV Cluster to test this on, but Select-Object -First 5 will select only 5 of the returned Cluster Resources:

Get-ClusterResource -Cluster cluster1 | where { $_.State -eq "Offline"} | Select-Object -First 5 | Start-ClusterResource

这篇关于我只想一次启动 5 个集群资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆