Powershell script to find clusters in a domain and send the result as attachment

# delete previous days check
#clusters.xls is the output file that contains cluster list in a domain
del “c:\logs\clusters.xls”

get-cluster -domain domainname > c:\logs\clusters.xls

send-mailmessage -from “email_address” -to “receiever_email_address” -cc “additional_receiepent” -subject “Clusters in domain” -Body “This attachment contains cluster names in domain” -Attachments “clusters.xls” -priority High -dno onSuccess, onFailure -smtpServer smtpservername

Advertisements

Author: priyathamsystemcenterblog

I am system center operations manager & configuration manager administrator And has good knowledge in windows servers too.................................:)

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