Tuesday, September 1, 2009
Script to monitor service status
We had a requirement to monitor a service status on multiple servers and send a mail to the team when the service is no longer is available /stopped.
This script is used to monitor a particular service and uses the SMTP server to send a mail to the team using the CDO object method.
===============================
'variable declaration
dim objShell, objNetdim strToEmailAddress, strFromEmailAddress, strServiceNameToCheckdim strSMTPServer, strSMTPServerPortdim strComputerName
Set objNet = CreateObject("WScript.NetWork")
' **** Set Variables here *****
strComputerName = "server name that you need to monitor"
strToEmailAddress = "email address"
strFromEmailAddress = "email address"
strServiceNameToCheck = "service display name to monitor "
strSMTPServer = "smtp server ip address or FQDN "
strSMTPServerPort = "25"
strsub = "service status"
set objShell = CreateObject("Shell.Application")
If objShell.IsServiceRunning(strServiceNameToCheck) Then
Wscript.Quit
else
Set objMessage = CreateObject("CDO.Message")
'Send Message
objMessage.From = strFromEmailAddress
objMessage.To = strToEmailAddress
objMessage.Subject = strsub
objMessage.TextBody = "The Service '" & strServiceNameToCheck & "' stopped on " & strComputerName & " Server " & vbcrlf & "Time: " & Now
objMessage.Configuration.Fields.Item http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTPserverobjMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = strSMTPServerPortobjMessage.Configuration.Fields.UpdateobjMessage.Send
End If
set objShell = nothing
set objNet = Nothing
=======================
This can be set as a scheduled task to monitor daily or depending on the schedule when required.
This script is used to monitor a particular service and uses the SMTP server to send a mail to the team using the CDO object method.
===============================
'variable declaration
dim objShell, objNetdim strToEmailAddress, strFromEmailAddress, strServiceNameToCheckdim strSMTPServer, strSMTPServerPortdim strComputerName
Set objNet = CreateObject("WScript.NetWork")
' **** Set Variables here *****
strComputerName = "server name that you need to monitor"
strToEmailAddress = "email address"
strFromEmailAddress = "email address"
strServiceNameToCheck = "service display name to monitor "
strSMTPServer = "smtp server ip address or FQDN "
strSMTPServerPort = "25"
strsub = "service status"
set objShell = CreateObject("Shell.Application")
If objShell.IsServiceRunning(strServiceNameToCheck) Then
Wscript.Quit
else
Set objMessage = CreateObject("CDO.Message")
'Send Message
objMessage.From = strFromEmailAddress
objMessage.To = strToEmailAddress
objMessage.Subject = strsub
objMessage.TextBody = "The Service '" & strServiceNameToCheck & "' stopped on " & strComputerName & " Server " & vbcrlf & "Time: " & Now
objMessage.Configuration.Fields.Item http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTPserverobjMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = strSMTPServerPortobjMessage.Configuration.Fields.UpdateobjMessage.Send
End If
set objShell = nothing
set objNet = Nothing
=======================
This can be set as a scheduled task to monitor daily or depending on the schedule when required.
Service Tag - Script
May I have your service tag number please :-)
on error resume next
strComputer=InputBox ("Enter the computer name of the server you'd like to query for Service Tag")
Set objWMIservice = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48)
For each objitem in colitems
if objitem.serialnumber ="" Then Msgbox "No tag was available!"
Else
Wscript.echo "Dell Service Tag: " & objitem.serialnumber
End If
Next
on error resume next
strComputer=InputBox ("Enter the computer name of the server you'd like to query for Service Tag")
Set objWMIservice = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48)
For each objitem in colitems
if objitem.serialnumber ="" Then Msgbox "No tag was available!"
Else
Wscript.echo "Dell Service Tag: " & objitem.serialnumber
End If
Next
Monday, August 31, 2009
ADWS
Replacing DMT ED with an AD based DMT, then ADWS might be of interest.
http://technet.microsoft.com/en-us/library/dd391908(WS.10).aspx
An ADWS overview and supported web service protocols
http://blogs.msdn.com/adpowershell/archive/2009/04/06/active-directory-web-services-overview.aspx
ADWS is a native option in Windows 2008 R2, it is also available as a download to allow the same usablility on older OSes like Windows 2008 SP1 and Windows 2003 SP2. http://support.microsoft.com/?scid=969041
Here's the AD Powershell blog...lotsa of great info here on managing AD from Powershell. BTW- The AD Powershell module connects to ADWS, so ADWS needs to be up and running to take advantage of the nifty features.
http://blogs.msdn.com/adpowershell/default.aspx
http://technet.microsoft.com/en-us/library/dd391908(WS.10).aspx
An ADWS overview and supported web service protocols
http://blogs.msdn.com/adpowershell/archive/2009/04/06/active-directory-web-services-overview.aspx
ADWS is a native option in Windows 2008 R2, it is also available as a download to allow the same usablility on older OSes like Windows 2008 SP1 and Windows 2003 SP2. http://support.microsoft.com/?scid=969041
Here's the AD Powershell blog...lotsa of great info here on managing AD from Powershell. BTW- The AD Powershell module connects to ADWS, so ADWS needs to be up and running to take advantage of the nifty features.
http://blogs.msdn.com/adpowershell/default.aspx
Thursday, August 27, 2009
Microsoft Cluster Service Command Line Tools – Cluster
The ‘cluster’ command can be used to either create a new cluster, or administer an existing cluster from a command line.
The basic syntax for the cluster command is:
cluster [[/cluster:]ClusterName] /Option
If creating a new cluster, these additional parameters should be added as Options:
ClusterName /create /ipaddrr:Static_IP_Address [,SubnetMask,NetworkConnectionName] /pass:Password /user:{Domain\UserName} [/node:NodeName] [/verb] [/unattend] [/min]
You can also add one or more nodes to an existing cluster:
ClusterName /add[nodes][:NodeName1[NodeName2, ....]] [/pass:Password] [/verb] [/unattend] [/min]
Note: the parameters /verb, /unattend, and /min stand for ‘verbose’, ‘undattended’, and ‘minimum respectively, and all three are optional:
Verbose – Writes all event messages to the cluster log.
Unattended – You will not be prompted for passwords not supplied at the command prompt.
Minimum – Creates a cluster using the Advanced (minimum) Configuration option. This option is used when creating clusters with complex storage configurations.
Rename a cluster: /ren:ClusterName
Display the Cluster Service version number: /ver
Change the Cluster Service account password on the domain controller and all nodes in the cluster:
/cluster:ClusterName/changepass:NewPassword[,OldPassword] [/skipdc] [/force] [/test] [/quiet] [/verb] [/unattend] [/help]
The optional parameters at the end of the above command line are as follows:
/skipdc – Changes the Cluster Service account password on only the cluster nodes, and not the DC.
/force – Forces the password change on all cluster nodes, even if some of the nodes are down or in an unknown state.
/test – This will open a connection to the cluster and verify that the password change was successful.
/quiet – No output will be displayed after the command is run.
/verb – Shows detailed information about the processes the command is running.
/help – Displays help information for the ‘cluster / changepass’ command only.
List the priority of all internal networks: /listnetpri
Set the priority order of internal networks: /setnetpri:NetworkName
Change the name, location, or size of the quorum or the quorum log:
/quorum[resource][:ResourceName] [/path:Drive:\Path\] [maxlogsize:MaximumSize_in_Kilobytes]
Register a Cluster Administrator extension DLL within the cluster:/reg[admin]ext:AdminExtension_DLL
Unregister a Cluster Administrator extension DLL within the cluster: /unreg[admin]ext:AdminExtension_DLL
Shows a list of all clusters in a specified domain: /list:[DomainName]
View a cluster’s properties: /prop [PropertyList]
View a cluster’s private properties: /priv [PropertyList]
The basic syntax for the cluster command is:
cluster [[/cluster:]ClusterName] /Option
If creating a new cluster, these additional parameters should be added as Options:
ClusterName /create /ipaddrr:Static_IP_Address [,SubnetMask,NetworkConnectionName] /pass:Password /user:{Domain\UserName} [/node:NodeName] [/verb] [/unattend] [/min]
You can also add one or more nodes to an existing cluster:
ClusterName /add[nodes][:NodeName1[NodeName2, ....]] [/pass:Password] [/verb] [/unattend] [/min]
Note: the parameters /verb, /unattend, and /min stand for ‘verbose’, ‘undattended’, and ‘minimum respectively, and all three are optional:
Verbose – Writes all event messages to the cluster log.
Unattended – You will not be prompted for passwords not supplied at the command prompt.
Minimum – Creates a cluster using the Advanced (minimum) Configuration option. This option is used when creating clusters with complex storage configurations.
Rename a cluster: /ren:ClusterName
Display the Cluster Service version number: /ver
Change the Cluster Service account password on the domain controller and all nodes in the cluster:
/cluster:ClusterName/changepass:NewPassword[,OldPassword] [/skipdc] [/force] [/test] [/quiet] [/verb] [/unattend] [/help]
The optional parameters at the end of the above command line are as follows:
/skipdc – Changes the Cluster Service account password on only the cluster nodes, and not the DC.
/force – Forces the password change on all cluster nodes, even if some of the nodes are down or in an unknown state.
/test – This will open a connection to the cluster and verify that the password change was successful.
/quiet – No output will be displayed after the command is run.
/verb – Shows detailed information about the processes the command is running.
/help – Displays help information for the ‘cluster / changepass’ command only.
List the priority of all internal networks: /listnetpri
Set the priority order of internal networks: /setnetpri:NetworkName
Change the name, location, or size of the quorum or the quorum log:
/quorum[resource][:ResourceName] [/path:Drive:\Path\] [maxlogsize:MaximumSize_in_Kilobytes]
Register a Cluster Administrator extension DLL within the cluster:/reg[admin]ext:AdminExtension_DLL
Unregister a Cluster Administrator extension DLL within the cluster: /unreg[admin]ext:AdminExtension_DLL
Shows a list of all clusters in a specified domain: /list:[DomainName]
View a cluster’s properties: /prop [PropertyList]
View a cluster’s private properties: /priv [PropertyList]
Friday, July 3, 2009
Friday, June 12, 2009
Exchange 2010 sessions from TechNet & TechEd
list of upcoming Exchange 2010 TechNet sessions:
TechNet Webcast: Exchange 2010 High Availability (Level 300) Monday, June 01, 2009 9:00 AM Pacific Time Event Overview: Welcome to the future! The future of Exchange high availability, that is. In this webcast, we reveal the changes and improvements to the built-in high availability platform in Exchange Server 2010. Exchange 2010 includes a unified framework for high availability and disaster recovery that is quick to deploy and easy to manage. Learn about all of the new features in Exchange 2010 that make it the most resilient, highly available version of Exchange ever. Presenter: Scott Schnoll, Principal Technical Writer, Microsoft Corporation
TechNet Webcast: Exchange 2010 Overview (Level 200) Wednesday, June 03, 2009 9:00 AM Pacific Time Event Overview: This webcast will introduce you to Exchange Server 2010, reviewing the major areas of investment for this release and highlighting marquee features. Presenter: Angi Livermore, Tech Solution Prof – Core UC, Microsoft Corporation
TechNet Webcast: Exchange 2010 Management Tools (Level 300) Monday, June 08, 2009 1:00 PM Pacific Time Event Overview: Exchange 2010 includes new capabilities that make the operation of your Exchange environment more efficient. Learn how we’ve made the Exchange Management Console more powerful, extended the reach of PowerShell, and made it easier to delegate management tasks. Presenter: Evan Dodds, US-Exchange Shared PM, Microsoft Corporation
TechNet Webcast: Exchange 2010 Archiving and Retention (Level 300) Wednesday, June 10, 2009 9:00 AM Pacific Time Event Overview: This webcast will introduce new ways to address archiving and retention with Exchange Server 2010. Presenter: Harold Wong, Senior IT Pro Evangelist, Microsoft Corporation
TechNet Webcast: Exchange 2010 Outlook Web Access (Level 200) Monday, June 15, 2009 9:00 AM Pacific Time Event Overview: Exchange 2010 brings new features and functionality to Outlook Web Access. See product demonstrations of the latest capabilities and understand how browser-based communication and collaboration gets better than ever in Exchange 2010. Presenter: Gary Danoys, Tech Solution Prof – Core UC, Microsoft Corporation
TechNet Webcast: Exchange 2010 Architecture (Level 300) Wednesday, June 17, 2009 9:00 AM Pacific Time Event Overview: This webcast describes the overall architecture of Exchange 2010 and key considerations for the scalability and performance of each server role. This webcast will provide the background and framework for the other Exchange 2010 webcasts, serving as a bridge between the overview session and drill-downs in each product area. This session is a recommended pre-requisite for the Exchange 2010 deployment and migration webcast. Presenter: Ross Smith, ITOE Senior IP Tech Architect, Exchange, Microsoft Corporation
TechNet Webcast: Federation in Exchange 2010 (Level 300) Monday, June 22, 2009 9:00 AM Pacific Time Event Overview: Federation is a key part of the architecture of Exchange 2010, powering new organization-to-organization sharing scenarios. Learn how federation enhances the capabilities of Exchange 2010 and enables advanced coexistence between Exchange Server and Exchange Online. Presenter: Paul Tischhauser, Principal Program Manager Lead, Microsoft Corporation
TechNet Webcast: Exchange 2010 Voice Mail enabled by Unified Messaging (Level 300) Wednesday, June 24, 2009 9:00 AM Pacific Time Event Overview: Exchange 2010 Unified Messaging is Microsoft’s second generation unified messaging and voice mail solution. In this webcast, learn about the features, benefits, and architecture of Unified Messaging in Exchange 2010. Presenter: Michael Wilson, Principal Program Manager Lead, Microsoft Corporation
TechNet Webcast: Exchange 2010 Information Protection and Control (Level 300) Monday, June 29, 2009 9:00 AM Pacific Time Event Overview: This webcast will introduce you to new ways to address information protection and control with Exchange Server 2010. A discussion of the use of encryption and rights management in parallel with Exchange will be included as well as an introduction to new functionality in Exchange that supports information protection scenarios. Presenter: Harold Wong, Senior IT Pro Evangelist, Microsoft Corporation
TechNet Webcast: Exchange 2010 Transition and Deployment (Level 300) Wednesday, July 01, 2009 9:00 AM Pacific Time Event Overview: In this session we will cover the migration planning and deployment path to move an organization from Exchange 2003 or Exchange 2007 to Exchange 2010. Presenter: Kristian Andaker, Principal Group Program Manager, Microsoft Corporation
some cool sessions from TechEd USA
Microsoft Exchange Server 2010 Architecture (Ross Smith IV)
TechNet Webcast: Exchange 2010 High Availability (Level 300) Monday, June 01, 2009 9:00 AM Pacific Time Event Overview: Welcome to the future! The future of Exchange high availability, that is. In this webcast, we reveal the changes and improvements to the built-in high availability platform in Exchange Server 2010. Exchange 2010 includes a unified framework for high availability and disaster recovery that is quick to deploy and easy to manage. Learn about all of the new features in Exchange 2010 that make it the most resilient, highly available version of Exchange ever. Presenter: Scott Schnoll, Principal Technical Writer, Microsoft Corporation
TechNet Webcast: Exchange 2010 Overview (Level 200) Wednesday, June 03, 2009 9:00 AM Pacific Time Event Overview: This webcast will introduce you to Exchange Server 2010, reviewing the major areas of investment for this release and highlighting marquee features. Presenter: Angi Livermore, Tech Solution Prof – Core UC, Microsoft Corporation
TechNet Webcast: Exchange 2010 Management Tools (Level 300) Monday, June 08, 2009 1:00 PM Pacific Time Event Overview: Exchange 2010 includes new capabilities that make the operation of your Exchange environment more efficient. Learn how we’ve made the Exchange Management Console more powerful, extended the reach of PowerShell, and made it easier to delegate management tasks. Presenter: Evan Dodds, US-Exchange Shared PM, Microsoft Corporation
TechNet Webcast: Exchange 2010 Archiving and Retention (Level 300) Wednesday, June 10, 2009 9:00 AM Pacific Time Event Overview: This webcast will introduce new ways to address archiving and retention with Exchange Server 2010. Presenter: Harold Wong, Senior IT Pro Evangelist, Microsoft Corporation
TechNet Webcast: Exchange 2010 Outlook Web Access (Level 200) Monday, June 15, 2009 9:00 AM Pacific Time Event Overview: Exchange 2010 brings new features and functionality to Outlook Web Access. See product demonstrations of the latest capabilities and understand how browser-based communication and collaboration gets better than ever in Exchange 2010. Presenter: Gary Danoys, Tech Solution Prof – Core UC, Microsoft Corporation
TechNet Webcast: Exchange 2010 Architecture (Level 300) Wednesday, June 17, 2009 9:00 AM Pacific Time Event Overview: This webcast describes the overall architecture of Exchange 2010 and key considerations for the scalability and performance of each server role. This webcast will provide the background and framework for the other Exchange 2010 webcasts, serving as a bridge between the overview session and drill-downs in each product area. This session is a recommended pre-requisite for the Exchange 2010 deployment and migration webcast. Presenter: Ross Smith, ITOE Senior IP Tech Architect, Exchange, Microsoft Corporation
TechNet Webcast: Federation in Exchange 2010 (Level 300) Monday, June 22, 2009 9:00 AM Pacific Time Event Overview: Federation is a key part of the architecture of Exchange 2010, powering new organization-to-organization sharing scenarios. Learn how federation enhances the capabilities of Exchange 2010 and enables advanced coexistence between Exchange Server and Exchange Online. Presenter: Paul Tischhauser, Principal Program Manager Lead, Microsoft Corporation
TechNet Webcast: Exchange 2010 Voice Mail enabled by Unified Messaging (Level 300) Wednesday, June 24, 2009 9:00 AM Pacific Time Event Overview: Exchange 2010 Unified Messaging is Microsoft’s second generation unified messaging and voice mail solution. In this webcast, learn about the features, benefits, and architecture of Unified Messaging in Exchange 2010. Presenter: Michael Wilson, Principal Program Manager Lead, Microsoft Corporation
TechNet Webcast: Exchange 2010 Information Protection and Control (Level 300) Monday, June 29, 2009 9:00 AM Pacific Time Event Overview: This webcast will introduce you to new ways to address information protection and control with Exchange Server 2010. A discussion of the use of encryption and rights management in parallel with Exchange will be included as well as an introduction to new functionality in Exchange that supports information protection scenarios. Presenter: Harold Wong, Senior IT Pro Evangelist, Microsoft Corporation
TechNet Webcast: Exchange 2010 Transition and Deployment (Level 300) Wednesday, July 01, 2009 9:00 AM Pacific Time Event Overview: In this session we will cover the migration planning and deployment path to move an organization from Exchange 2003 or Exchange 2007 to Exchange 2010. Presenter: Kristian Andaker, Principal Group Program Manager, Microsoft Corporation
some cool sessions from TechEd USA
Microsoft Exchange Server 2010 Architecture (Ross Smith IV)
Storage in Microsoft Exchange Server 2010 (Matt Gossage)
High Availability in Microsoft Exchange Server 2010 (Scott Schnoll)
Microsoft Exchange Server 2010 Management Tools (Evan Dodds & Paul McKnight) Information Protection and Control in Microsoft Exchange Server 2010 (Ed Banti & Jesse Doughterty)
Microsoft Exchange Server Outlook Web Access 2010: The Future of Web-Based E-mail (Paul Limont)
Unified Messaging in Microsoft Exchange Server 2010 (Michael Wilson)
Subscribe to:
Posts (Atom)
