Check if the Server is Clustered or not


Hi All,

Below is the simple PowerShell snippet, which could check if the server is cluster or not

$ServerName=’Server1’

$sObj = Get-WmiObject -Class Win32_SystemServices -ComputerName $ServerName

if ($sObj | select PartComponent | where {$_ -like "*ClusSvc*"})

{

Write-Output "$ServerName is Clustered"

}

else

{

Write-Output "$server is Not clustered"

}

Regards,

Chaitanya

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: