Hi Everyone,
I'm wondering if there is another similar Powershell script which can determine the current active node of a MSCS ?
the following is done on VBScript
strClusterWMINameString = "winmgmts:\\ExchangeServerCluster01\root\cimv2"Set objWMISvc = GetObject( strClusterWMINameString )Set colItems = objWMISvc.ExecQuery( "Select * from Win32_ComputerSystem", , 48 )For Each objItem in colItemsstrComputerName = objItem.NameWScript.Echo "The Cluster " & strClusterWMINameString & " active node is " & strComputerNameNext
Any kind of help is appreciated.
Thanks.
In PowerShell you can do this with:
(Get-WmiObject Win32_ComputerSystem -Computer SIEXCLU01).Name
Regards, Robert
In PowerShell you can do this with:
(Get-WmiObject Win32_ComputerSystem -Computer SIEXCLU01).Name
Regards, Robert
Many thanks Rob, you are ScriptKing !